More help for alpha WARNS=2. This code is, erm, unusual. Anyone who
feels like rewriting it will meet no objection from me.
This commit is contained in:
parent
54ab3ed82b
commit
5eb2b33ad8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87267
@ -1245,14 +1245,14 @@ addarg(char **argv, const char *val)
|
||||
}
|
||||
for (cpp = argv; *cpp; cpp++)
|
||||
;
|
||||
if (cpp == &argv[(int)argv[-1]]) {
|
||||
if (cpp == &argv[(long)argv[-1]]) {
|
||||
--argv;
|
||||
*argv = (char *)((int)(*argv) + 10);
|
||||
argv = (char **)realloc(argv, sizeof(*argv)*((int)(*argv) + 2));
|
||||
*argv = (char *)((long)(*argv) + 10);
|
||||
argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2));
|
||||
if (argv == NULL)
|
||||
return(NULL);
|
||||
argv++;
|
||||
cpp = &argv[(int)argv[-1] - 10];
|
||||
cpp = &argv[(long)argv[-1] - 10];
|
||||
}
|
||||
*cpp++ = strdup(val);
|
||||
*cpp = 0;
|
||||
|
@ -1245,14 +1245,14 @@ addarg(char **argv, const char *val)
|
||||
}
|
||||
for (cpp = argv; *cpp; cpp++)
|
||||
;
|
||||
if (cpp == &argv[(int)argv[-1]]) {
|
||||
if (cpp == &argv[(long)argv[-1]]) {
|
||||
--argv;
|
||||
*argv = (char *)((int)(*argv) + 10);
|
||||
argv = (char **)realloc(argv, sizeof(*argv)*((int)(*argv) + 2));
|
||||
*argv = (char *)((long)(*argv) + 10);
|
||||
argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2));
|
||||
if (argv == NULL)
|
||||
return(NULL);
|
||||
argv++;
|
||||
cpp = &argv[(int)argv[-1] - 10];
|
||||
cpp = &argv[(long)argv[-1] - 10];
|
||||
}
|
||||
*cpp++ = strdup(val);
|
||||
*cpp = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user