From: Vladimir 'phcoder' Serbinenko Date: Mon, 21 Oct 2013 11:40:05 +0000 (+0200) Subject: * grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0 X-Git-Tag: grub-2.02-beta1~601 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac1feb61d28016a6d052d2c246ef33ca246f3d84;p=thirdparty%2Fgrub.git * grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0 check. Saves 10 bytes on compressed image. --- diff --git a/ChangeLog b/ChangeLog index 7c84c6eae..fef02b0ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-10-21 Vladimir Serbinenko + + * grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0 + check. + + Saves 10 bytes on compressed image. + 2013-10-21 Vladimir Serbinenko * grub-core/kern/misc.c (grub_isprint): Move to ... diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 5fe416477..be79dfdc4 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -371,7 +371,8 @@ grub_strtoull (const char *str, char **end, int base) int found = 0; /* Skip white spaces. */ - while (*str && grub_isspace (*str)) + /* grub_isspace checks that *str != '\0'. */ + while (grub_isspace (*str)) str++; /* Guess the base, if not specified. The prefix `0x' means 16, and