mirror of
https://github.com/sheumann/telnetd.git
synced 2024-11-29 16:50:58 +00:00
More help for alpha WARNS=2. This code is, erm, unusual. Anyone who
feels like rewriting it will meet no objection from me. git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
parent
0efd3a3530
commit
ba361ec27c
@ -1245,14 +1245,14 @@ addarg(char **argv, const char *val)
|
|||||||
}
|
}
|
||||||
for (cpp = argv; *cpp; cpp++)
|
for (cpp = argv; *cpp; cpp++)
|
||||||
;
|
;
|
||||||
if (cpp == &argv[(int)argv[-1]]) {
|
if (cpp == &argv[(long)argv[-1]]) {
|
||||||
--argv;
|
--argv;
|
||||||
*argv = (char *)((int)(*argv) + 10);
|
*argv = (char *)((long)(*argv) + 10);
|
||||||
argv = (char **)realloc(argv, sizeof(*argv)*((int)(*argv) + 2));
|
argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2));
|
||||||
if (argv == NULL)
|
if (argv == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
argv++;
|
argv++;
|
||||||
cpp = &argv[(int)argv[-1] - 10];
|
cpp = &argv[(long)argv[-1] - 10];
|
||||||
}
|
}
|
||||||
*cpp++ = strdup(val);
|
*cpp++ = strdup(val);
|
||||||
*cpp = 0;
|
*cpp = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user