diff options
author | Andres Freund <andres@anarazel.de> | 2018-10-15 20:45:30 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2018-10-15 21:01:14 -0700 |
commit | 62649bad831fb69b5d9644470acc413a35cddea6 (patch) | |
tree | e0d99a747615337e515290eb634c2f74fb2df2b6 /src/backend/utils/adt/cash.c | |
parent | c5257345ef61922468cd9abd887c3cb6c38792cb (diff) |
Correct constness of a few variables.
This allows the compiler / linker to mark affected pages as read-only.
There's other cases, but they're a bit more invasive, and should go
through some review. These are easy.
They were found with
objdump -j .data -t src/backend/postgres|awk '{print $4, $5, $6}'|sort -r|less
Discussion: https://postgr.es/m/20181015200754.7y7zfuzsoux2c4ya@alap3.anarazel.de
Diffstat (limited to 'src/backend/utils/adt/cash.c')
-rw-r--r-- | src/backend/utils/adt/cash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index c787dd34191..c92e9d5046a 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -39,13 +39,13 @@ static const char * num_word(Cash value) { static char buf[128]; - static const char *small[] = { + static const char *const small[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" }; - const char **big = small + 18; + const char *const *big = small + 18; int tu = value % 100; /* deal with the simple cases first */ |