X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..d205d39a:/sbr/arglist.c?ds=inline diff --git a/sbr/arglist.c b/sbr/arglist.c index 35646afa..cd88b86b 100644 --- a/sbr/arglist.c +++ b/sbr/arglist.c @@ -1,5 +1,4 @@ -/* - * arglist.c -- Routines for handling argument lists for execvp() and friends +/* arglist.c -- Routines for handling argument lists for execvp() and friends * * This code is Copyright (c) 2013, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -200,8 +199,8 @@ argsplit_insert(struct msgs_array *msgs, char *command, char **program) */ if (msgs->size + argp >= msgs->max) { - msgs->max += MAXMSGS > argp ? MAXMSGS : argp; - msgs->msgs = mh_xrealloc(msgs->msgs, msgs->max * sizeof(*msgs->msgs)); + msgs->max += max(MAXMSGS, argp); + msgs->msgs = mh_xrealloc(msgs->msgs, msgs->max * sizeof(*msgs->msgs)); } for (i = msgs->size - 1; i >= 0; i--)