mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit
\0 checking. Saves 70 bytes on compressed image.
This commit is contained in:
1 parent
ac1feb61d2
commit
f8401f760c
2 files changed
+15
-8
No files matched your search
@@ -1,3 +1,10 @@
|
|||||||
|
2013-10-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit
|
||||||
|
\0 checking.
|
||||||
|
|
||||||
|
Saves 70 bytes on compressed image.
|
||||||
|
|
||||||
2013-10-21 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-10-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0
|
* grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0
|
||||||
|
|||||||
@@ -732,30 +732,30 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
|
|||||||
|
|
||||||
curn = n++;
|
curn = n++;
|
||||||
|
|
||||||
if (*fmt && *fmt =='-')
|
if (*fmt =='-')
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
p = fmt;
|
p = fmt;
|
||||||
|
|
||||||
while (*fmt && grub_isdigit (*fmt))
|
while (grub_isdigit (*fmt))
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
if (*fmt && *fmt == '$')
|
if (*fmt == '$')
|
||||||
{
|
{
|
||||||
curn = grub_strtoull (p, 0, 10) - 1;
|
curn = grub_strtoull (p, 0, 10) - 1;
|
||||||
fmt++;
|
fmt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*fmt && *fmt =='-')
|
if (*fmt =='-')
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
while (*fmt && grub_isdigit (*fmt))
|
while (grub_isdigit (*fmt))
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
if (*fmt && *fmt =='.')
|
if (*fmt =='.')
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
while (*fmt && grub_isdigit (*fmt))
|
while (grub_isdigit (*fmt))
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|
||||||
c = *fmt++;
|
c = *fmt++;
|
||||||
@@ -841,7 +841,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
|
|||||||
|
|
||||||
rescan:;
|
rescan:;
|
||||||
|
|
||||||
if (*fmt && *fmt =='-')
|
if (*fmt =='-')
|
||||||
{
|
{
|
||||||
rightfill = 1;
|
rightfill = 1;
|
||||||
fmt++;
|
fmt++;
|
||||||
|
|||||||
Reference in new issue
Block a user