Skip to contentSkip to conversation

missing static in lib/vsprinf.c

PATCH New Andrey Panin 1 participant 1 message Jul 12, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 missing static in lib/vsprinf.c

Hi all,

attached patch adds missing static modifiers for small_digits[] and large_digits[] arrays in the number() function from lib/vsprintf.c

Patch against 2.5.25, should apply to 2.4.x.
Please consider applying.

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: wwwkeys.eu.pgp.net
lib/vsprintf.c +2 -2
diff -urN -X /usr/share/dontdiff linux.vanilla/lib/vsprintf.c linux/lib/vsprintf.c
@@ -131,8 +131,8 @@
 {
 	char c,sign,tmp[66];
 	const char *digits;
-	const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-	const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+	static const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+	static const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 	int i;
 
 	digits = (type & LARGE) ? large_digits : small_digits;