aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 6438cd5599ee..e5ab51fc2d9e 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -546,12 +546,12 @@ static char *number(char *buf, char *end, unsigned long long num,
546 return buf; 546 return buf;
547} 547}
548 548
549static char *string(char *buf, char *end, char *s, struct printf_spec spec) 549static char *string(char *buf, char *end, const char *s, struct printf_spec spec)
550{ 550{
551 int len, i; 551 int len, i;
552 552
553 if ((unsigned long)s < PAGE_SIZE) 553 if ((unsigned long)s < PAGE_SIZE)
554 s = "<NULL>"; 554 s = "(null)";
555 555
556 len = strnlen(s, spec.precision); 556 len = strnlen(s, spec.precision);
557 557
@@ -1498,7 +1498,7 @@ do { \
1498 size_t len; 1498 size_t len;
1499 if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE 1499 if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE
1500 || (unsigned long)save_str < PAGE_SIZE) 1500 || (unsigned long)save_str < PAGE_SIZE)
1501 save_str = "<NULL>"; 1501 save_str = "(null)";
1502 len = strlen(save_str); 1502 len = strlen(save_str);
1503 if (str + len + 1 < end) 1503 if (str + len + 1 < end)
1504 memcpy(str, save_str, len + 1); 1504 memcpy(str, save_str, len + 1);