vsprintf: factorize "(null)" string
[safe/jmp/linux-2.6] / lib / vsprintf.c
index 6438cd5..e5ab51f 100644 (file)
@@ -546,12 +546,12 @@ static char *number(char *buf, char *end, unsigned long long num,
        return buf;
 }
 
        return buf;
 }
 
-static char *string(char *buf, char *end, char *s, struct printf_spec spec)
+static char *string(char *buf, char *end, const char *s, struct printf_spec spec)
 {
        int len, i;
 
        if ((unsigned long)s < PAGE_SIZE)
 {
        int len, i;
 
        if ((unsigned long)s < PAGE_SIZE)
-               s = "<NULL>";
+               s = "(null)";
 
        len = strnlen(s, spec.precision);
 
 
        len = strnlen(s, spec.precision);
 
@@ -1498,7 +1498,7 @@ do {                                                                      \
                        size_t len;
                        if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE
                                        || (unsigned long)save_str < PAGE_SIZE)
                        size_t len;
                        if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE
                                        || (unsigned long)save_str < PAGE_SIZE)
-                               save_str = "<NULL>";
+                               save_str = "(null)";
                        len = strlen(save_str);
                        if (str + len + 1 < end)
                                memcpy(str, save_str, len + 1);
                        len = strlen(save_str);
                        if (str + len + 1 < end)
                                memcpy(str, save_str, len + 1);