diff options
author | peter <peter@FreeBSD.org> | 2003-01-08 06:43:27 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-01-08 06:43:27 +0000 |
commit | 45d9788d10588b62ecb4aa760a3314f3f9531c94 (patch) | |
tree | fe085c8905e0680e8dac41025b077bf9294e10e5 /sbin/slattach/slattach.c | |
parent | 62808c26185f6553517dd7188b7e420f6b0ebc5e (diff) | |
download | FreeBSD-src-45d9788d10588b62ecb4aa760a3314f3f9531c94.zip FreeBSD-src-45d9788d10588b62ecb4aa760a3314f3f9531c94.tar.gz |
Change this:
#include <strings.h>
...
foo = (char *)strdup(...);
To:
#include <string.h>
foo = strdup(...);
because the former segfaults on an ia64 since there is no prototype
for strdup() in strings.h. Converting an "int" to a pointer is fatal.
Diffstat (limited to 'sbin/slattach/slattach.c')
-rw-r--r-- | sbin/slattach/slattach.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index 3ed4b2e..d662294 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -59,7 +59,7 @@ static const char rcsid[] = #include <signal.h> #include <stdio.h> #include <stdlib.h> -#include <strings.h> +#include <string.h> #include <syslog.h> #include <termios.h> #include <unistd.h> @@ -131,7 +131,7 @@ main(int argc, char **argv) slflags &= ~IFF_LINK2; break; case 'e': - exit_cmd = (char*) strdup (optarg); + exit_cmd = strdup (optarg); break; case 'f': foreground = 1; @@ -146,13 +146,13 @@ main(int argc, char **argv) slflags |= IFF_LINK1; break; case 'r': - redial_cmd = (char*) strdup (optarg); + redial_cmd = strdup (optarg); break; case 's': speed = atoi(optarg); break; case 'u': - config_cmd = (char*) strdup (optarg); + config_cmd = strdup (optarg); break; case 'z': redial_on_startup = 1; |