added explict casts for strdup since many includes don't prototype
it. gag me.
This commit is contained in:
2
sudo.c
2
sudo.c
@@ -400,7 +400,7 @@ static void load_globals(sudo_mode)
|
||||
if ((tty = (char *) ttyname(0)) || (tty = (char *) ttyname(1))) {
|
||||
if (strncmp(tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
|
||||
tty += sizeof(_PATH_DEV) - 1;
|
||||
if ((tty = strdup(tty)) == NULL) {
|
||||
if ((tty = (char *) strdup(tty)) == NULL) {
|
||||
perror("malloc");
|
||||
(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user