mirror of
https://github.com/curl/curl.git
synced 2026-07-24 06:37:15 +03:00
Add 'const' to immutable arrays.
This commit is contained in:
parent
9359498b06
commit
1ba47e7af9
10 changed files with 32 additions and 31 deletions
|
|
@ -816,8 +816,8 @@ static int dprintf_formatf(
|
|||
case FORMAT_STRING:
|
||||
/* String. */
|
||||
{
|
||||
static char null[] = "(nil)";
|
||||
char *str;
|
||||
static const char null[] = "(nil)";
|
||||
const char *str;
|
||||
size_t len;
|
||||
|
||||
str = (char *) p->data.str;
|
||||
|
|
@ -830,7 +830,7 @@ static int dprintf_formatf(
|
|||
p->flags &= (~FLAGS_ALT);
|
||||
}
|
||||
else {
|
||||
str = (char *)"";
|
||||
str = "";
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -875,8 +875,8 @@ static int dprintf_formatf(
|
|||
}
|
||||
else {
|
||||
/* Write "(nil)" for a nil pointer. */
|
||||
static char strnil[] = "(nil)";
|
||||
char *point;
|
||||
static const char strnil[] = "(nil)";
|
||||
const char *point;
|
||||
|
||||
width -= sizeof(strnil) - 1;
|
||||
if (p->flags & FLAGS_LEFT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue