From: Vladimir Serbinenko Date: Sun, 27 Oct 2013 12:20:50 +0000 (+0100) Subject: * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit X-Git-Tag: grub-2.02-beta1~557 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=891b713be34ce764325d071271926aa100a52d0f;p=thirdparty%2Fgrub.git * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit \0 checking. --- diff --git a/ChangeLog b/ChangeLog index 8d798221d..e53bb88d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-21 Vladimir Serbinenko + + * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit + \0 checking. + 2013-10-27 Vladimir Serbinenko * grub-core/lib/legacy_parse.c: Add support for "nd" disk. diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index aa8a003f1..431522e29 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -664,34 +664,33 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a if (c != '%') continue; - if (*fmt && *fmt =='-') + if (*fmt =='-') fmt++; - while (*fmt && grub_isdigit (*fmt)) + while (grub_isdigit (*fmt)) fmt++; - if (*fmt && *fmt == '$') + if (*fmt == '$') fmt++; - if (*fmt && *fmt =='-') + if (*fmt =='-') fmt++; - while (*fmt && grub_isdigit (*fmt)) + while (grub_isdigit (*fmt)) fmt++; - if (*fmt && *fmt =='.') + if (*fmt =='.') fmt++; - while (*fmt && grub_isdigit (*fmt)) + while (grub_isdigit (*fmt)) fmt++; c = *fmt++; if (c == 'l') - { - c = *fmt++; - if (c == 'l') - c = *fmt++; - } + c = *fmt++; + if (c == 'l') + c = *fmt++; + switch (c) { case 'p':