aboutsummaryrefslogtreecommitdiffstats
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1a9c6b9b4944..0ddf928fe4d5 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -50,7 +50,7 @@ static unsigned int simple_guess_base(const char *cp)
50 * @endp: A pointer to the end of the parsed string will be placed here 50 * @endp: A pointer to the end of the parsed string will be placed here
51 * @base: The number base to use 51 * @base: The number base to use
52 */ 52 */
53unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base) 53unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
54{ 54{
55 unsigned long result = 0; 55 unsigned long result = 0;
56 56
@@ -82,13 +82,12 @@ EXPORT_SYMBOL(simple_strtoul);
82 * @endp: A pointer to the end of the parsed string will be placed here 82 * @endp: A pointer to the end of the parsed string will be placed here
83 * @base: The number base to use 83 * @base: The number base to use
84 */ 84 */
85long simple_strtol(const char *cp,char **endp,unsigned int base) 85long simple_strtol(const char *cp, char **endp, unsigned int base)
86{ 86{
87 if(*cp=='-') 87 if(*cp == '-')
88 return -simple_strtoul(cp+1,endp,base); 88 return -simple_strtoul(cp + 1, endp, base);
89 return simple_strtoul(cp,endp,base); 89 return simple_strtoul(cp, endp, base);
90} 90}
91
92EXPORT_SYMBOL(simple_strtol); 91EXPORT_SYMBOL(simple_strtol);
93 92
94/** 93/**
@@ -97,7 +96,7 @@ EXPORT_SYMBOL(simple_strtol);
97 * @endp: A pointer to the end of the parsed string will be placed here 96 * @endp: A pointer to the end of the parsed string will be placed here
98 * @base: The number base to use 97 * @base: The number base to use
99 */ 98 */
100unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base) 99unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
101{ 100{
102 unsigned long long result = 0; 101 unsigned long long result = 0;
103 102
@@ -129,11 +128,11 @@ EXPORT_SYMBOL(simple_strtoull);
129 * @endp: A pointer to the end of the parsed string will be placed here 128 * @endp: A pointer to the end of the parsed string will be placed here
130 * @base: The number base to use 129 * @base: The number base to use
131 */ 130 */
132long long simple_strtoll(const char *cp,char **endp,unsigned int base) 131long long simple_strtoll(const char *cp, char **endp, unsigned int base)
133{ 132{
134 if(*cp=='-') 133 if(*cp=='-')
135 return -simple_strtoull(cp+1,endp,base); 134 return -simple_strtoull(cp + 1, endp, base);
136 return simple_strtoull(cp,endp,base); 135 return simple_strtoull(cp, endp, base);
137} 136}
138 137
139 138
@@ -798,7 +797,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
798 /* the trailing null byte doesn't count towards the total */ 797 /* the trailing null byte doesn't count towards the total */
799 return str-buf; 798 return str-buf;
800} 799}
801
802EXPORT_SYMBOL(vsnprintf); 800EXPORT_SYMBOL(vsnprintf);
803 801
804/** 802/**
@@ -824,7 +822,6 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
824 i=vsnprintf(buf,size,fmt,args); 822 i=vsnprintf(buf,size,fmt,args);
825 return (i >= size) ? (size - 1) : i; 823 return (i >= size) ? (size - 1) : i;
826} 824}
827
828EXPORT_SYMBOL(vscnprintf); 825EXPORT_SYMBOL(vscnprintf);
829 826
830/** 827/**
@@ -851,7 +848,6 @@ int snprintf(char * buf, size_t size, const char *fmt, ...)
851 va_end(args); 848 va_end(args);
852 return i; 849 return i;
853} 850}
854
855EXPORT_SYMBOL(snprintf); 851EXPORT_SYMBOL(snprintf);
856 852
857/** 853/**
@@ -896,7 +892,6 @@ int vsprintf(char *buf, const char *fmt, va_list args)
896{ 892{
897 return vsnprintf(buf, INT_MAX, fmt, args); 893 return vsnprintf(buf, INT_MAX, fmt, args);
898} 894}
899
900EXPORT_SYMBOL(vsprintf); 895EXPORT_SYMBOL(vsprintf);
901 896
902/** 897/**
@@ -921,7 +916,6 @@ int sprintf(char * buf, const char *fmt, ...)
921 va_end(args); 916 va_end(args);
922 return i; 917 return i;
923} 918}
924
925EXPORT_SYMBOL(sprintf); 919EXPORT_SYMBOL(sprintf);
926 920
927/** 921/**
@@ -1150,7 +1144,6 @@ int vsscanf(const char * buf, const char * fmt, va_list args)
1150 1144
1151 return num; 1145 return num;
1152} 1146}
1153
1154EXPORT_SYMBOL(vsscanf); 1147EXPORT_SYMBOL(vsscanf);
1155 1148
1156/** 1149/**
@@ -1169,5 +1162,4 @@ int sscanf(const char * buf, const char * fmt, ...)
1169 va_end(args); 1162 va_end(args);
1170 return i; 1163 return i;
1171} 1164}
1172
1173EXPORT_SYMBOL(sscanf); 1165EXPORT_SYMBOL(sscanf);