diff --git a/libmisc/shell.c b/libmisc/shell.c index 29724063..7c67500d 100644 --- a/libmisc/shell.c +++ b/libmisc/shell.c @@ -45,7 +45,7 @@ int shell (const char *file, /*@null@*/const char *arg, char *const envp[]) * don't want to tell us what it is themselves. */ if (arg == (char *) 0) { - (void) snprintf (arg0, sizeof arg0, "-%s", Basename ((char *) file)); + (void) snprintf (arg0, sizeof arg0, "-%s", Basename (file)); arg0[sizeof arg0 - 1] = '\0'; arg = arg0; } diff --git a/src/newgrp.c b/src/newgrp.c index cb88f6d7..99820832 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -379,7 +379,7 @@ int main (int argc, char **argv) int err = 0; gid_t gid; char *cp; - char *progbase; + const char *progbase; const char *name, *prog; char *group = NULL; char *command = NULL; @@ -787,7 +787,7 @@ int main (int argc, char **argv) * Now I try to find the basename of the login shell. This will * become argv[0] of the spawned command. */ - progbase = (char *) Basename ((char *) prog); + progbase = Basename (prog); /* * Switch back to her home directory if i am doing login