~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to grub-core/script/argv.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-17 23:59:10 UTC
  • mto: (17.3.55 sid)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: james.westby@ubuntu.com-20110517235910-ma8u889vyjdfro27
Tags: upstream-1.99
ImportĀ upstreamĀ versionĀ 1.99

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
static unsigned
26
26
round_up_exp (unsigned v)
27
27
{
 
28
  COMPILE_TIME_ASSERT (sizeof (v) == 4);
 
29
 
28
30
  v--;
29
31
  v |= v >> 1;
30
32
  v |= v >> 2;
32
34
  v |= v >> 8;
33
35
  v |= v >> 16;
34
36
 
35
 
  if (sizeof (v) > 4)
36
 
    v |= v >> 32;
37
 
 
38
37
  v++;
39
38
  v += (v == 0);
40
39