Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/rpcgen/rpc_main.c
Show First 20 Lines • Show All 919 Lines • ▼ Show 20 Lines | if (argmax > INT_MAX / 4) { | ||||
warnx("refusing to allocate too many arguments"); | warnx("refusing to allocate too many arguments"); | ||||
crash(); | crash(); | ||||
} | } | ||||
newarglist = realloc(arglist, argmax * sizeof(*arglist)); | newarglist = realloc(arglist, argmax * sizeof(*arglist)); | ||||
if (newarglist == NULL) { | if (newarglist == NULL) { | ||||
warnx("unable to allocate arglist"); | warnx("unable to allocate arglist"); | ||||
crash(); | crash(); | ||||
} | } | ||||
free(arglist); | |||||
arglist = newarglist; | arglist = newarglist; | ||||
} | } | ||||
/* | /* | ||||
* Add another argument to the arg list | * Add another argument to the arg list | ||||
*/ | */ | ||||
static void | static void | ||||
addarg(const char *cp) | addarg(const char *cp) | ||||
▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines |