From e8ec76b5515faf161ff78a9070786acca97bc605 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 30 Apr 2015 17:59:05 -0700 Subject: [PATCH] lint: use const for string literal --- src/options.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/options.c b/src/options.c index 83d957537..8a5e65254 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date: 1430192504 2015/04/28 03:41:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.189 $ */ +/* NetHack 3.5 options.c $NHDT-Date: 1430441885 2015/05/01 00:58:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.191 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -501,7 +501,7 @@ STATIC_OVL int FDECL(count_ape_maps, (int *, int *)); STATIC_DCL const char *FDECL(clr2colorname, (int)); STATIC_DCL const char *FDECL(attr2attrname, (int)); STATIC_DCL int NDECL(query_color); -STATIC_DCL int FDECL(query_attr, (char *)); +STATIC_DCL int FDECL(query_attr, (const char *)); STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int)); STATIC_DCL void FDECL(free_one_menu_coloring, (int)); STATIC_DCL int NDECL(count_menucolors); @@ -1221,7 +1221,7 @@ query_color() int query_attr(prompt) -char *prompt; +const char *prompt; { winid tmpwin; anything any; @@ -1233,7 +1233,8 @@ char *prompt; any = zeroany; for (i = 0; i < SIZE(attrnames); i++) { any.a_int = i + 1; - add_menu(tmpwin, NO_GLYPH, &any, 0, 0, attrnames[i].attr, attrnames[i].name, MENU_UNSELECTED); + add_menu(tmpwin, NO_GLYPH, &any, 0, 0, + attrnames[i].attr, attrnames[i].name, MENU_UNSELECTED); } end_menu(tmpwin, prompt ? prompt : "Pick an attribute"); pick_cnt = select_menu(tmpwin, PICK_ONE, &picks);