added explict casts for strdup since many includes don't prototype

it.  gag me.
This commit is contained in:
Todd C. Miller
1995-11-25 18:53:22 +00:00
parent 6b80b1c56a
commit d7716e975e
3 changed files with 6 additions and 6 deletions

2
sudo.c
View File

@@ -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);