]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - lib/vsprintf.c
net: hifemac_mdio: use log_msg_ret() correctly, report error by dev_err()
[thirdparty/u-boot.git] / lib / vsprintf.c
index 2d13e68b57980c1a9bbb5b6d1568eabcac4fcb9b..27ea9c907a32cbc936481d19b3dc8a66c994a92e 100644 (file)
@@ -13,7 +13,6 @@
  * from hush: simple_itoa() was lifted from boa-0.93.15
  */
 
-#include <common.h>
 #include <charset.h>
 #include <efi_loader.h>
 #include <div64.h>
@@ -674,15 +673,20 @@ repeat:
 
                case 'x':
                        flags |= SMALL;
+               /* fallthrough */
                case 'X':
                        base = 16;
                        break;
 
                case 'd':
-                       if (fmt[1] == 'E')
+                       if (fmt[1] == 'E') {
                                flags |= ERRSTR;
+                               fmt++;
+                       }
+               /* fallthrough */
                case 'i':
                        flags |= SIGN;
+               /* fallthrough */
                case 'u':
                        break;
 
@@ -722,7 +726,6 @@ repeat:
                        ADDCH(str, ' ');
                        for (p = errno_str(num); *p; p++)
                                ADDCH(str, *p);
-                       fmt++;
                }
        }