Browse Source

Merge branches 'x86-boot-for-linus' and 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull tiny x86 boot cleanups from Ingo Molnar.

* 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Fix a sanity check in printf.c

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, boot: Fix warning due to undeclared strlen()
Linus Torvalds 12 years ago
parent
commit
9cb87aaf40
2 changed files with 2 additions and 1 deletions
  1. 1 0
      arch/x86/boot/boot.h
  2. 1 1
      arch/x86/boot/printf.c

+ 1 - 0
arch/x86/boot/boot.h

@@ -355,6 +355,7 @@ int strncmp(const char *cs, const char *ct, size_t count);
 size_t strnlen(const char *s, size_t maxlen);
 unsigned int atou(const char *s);
 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
+size_t strlen(const char *s);
 
 /* tty.c */
 void puts(const char *);

+ 1 - 1
arch/x86/boot/printf.c

@@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision,
 	locase = (type & SMALL);
 	if (type & LEFT)
 		type &= ~ZEROPAD;
-	if (base < 2 || base > 36)
+	if (base < 2 || base > 16)
 		return NULL;
 	c = (type & ZEROPAD) ? '0' : ' ';
 	sign = 0;