declare constant function parameters const (as well as constant function return values)

This commit is contained in:
marschap
2006-09-12 16:23:24 +00:00
parent f34c246200
commit cc2c84a7b8
21 changed files with 78 additions and 68 deletions
+2 -2
View File
@@ -175,9 +175,9 @@ int process_command_line(int argc, char **argv)
return error;
}
int process_configfile(char * configfile)
int process_configfile(char *configfile)
{
char * tmp;
const char *tmp;
if (configfile == NULL)
configfile = DEFAULT_CONFIGFILE;
+2 -2
View File
@@ -21,7 +21,7 @@
#include "menu.h"
/* recursively read the menu hierarchy */
MenuEntry *menu_read(MenuEntry *parent, char *name)
MenuEntry *menu_read(MenuEntry *parent, const char *name)
{
static int id = 0;
@@ -50,7 +50,7 @@ MenuEntry *menu_read(MenuEntry *parent, char *name)
if (config_get_string(name, "Entry", 0, NULL) != NULL) {
MenuEntry **addr = &me->entries;
char *entryname;
const char *entryname;
int index = 0;
// it is a sub-menu
+1 -1
View File
@@ -41,7 +41,7 @@ typedef struct menu_entry {
} MenuEntry;
MenuEntry *menu_read(MenuEntry *parent, char *name);
MenuEntry *menu_read(MenuEntry *parent, const char *ame);
int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock);
MenuEntry *menu_find_by_id(MenuEntry *me, int id);
const char *menu_command(MenuEntry *me);