add missing const
If you want to declare a pointer which the address pointed to is constant, you should declare it as like `static const char *const var = "...";`. This commit supplies missing `const` and prevents some programming error in the future.
This commit is contained in:
@@ -41,9 +41,9 @@ static boolean blocked_boulder(int, int);
|
||||
* responsible for the theft of the Amulet from Marduk, the Creator.
|
||||
* Moloch is unaligned.
|
||||
*/
|
||||
static const char *Moloch = "Moloch";
|
||||
static const char *const Moloch = "Moloch";
|
||||
|
||||
static const char *godvoices[] = {
|
||||
static const char *const godvoices[] = {
|
||||
"booms out", "thunders", "rings out", "booms",
|
||||
};
|
||||
|
||||
@@ -2188,7 +2188,7 @@ align_gname(aligntyp alignment)
|
||||
return gnam;
|
||||
}
|
||||
|
||||
static const char *hallu_gods[] = {
|
||||
static const char *const hallu_gods[] = {
|
||||
"the Flying Spaghetti Monster", /* Church of the FSM */
|
||||
"Eris", /* Discordianism */
|
||||
"the Martians", /* every science fiction ever */
|
||||
|
||||
Reference in New Issue
Block a user