X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=d863b5bb257745cda3853b698ffba6da739ab7c1;hp=53320d32520365921c20fc0050773dbe69739ea9;hb=1bb1f6c3f38b05060bf699ea2743f7386889bf63;hpb=7480dbc14bc90f2d872d434205c0784704213252 diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 53320d3..d863b5b 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -44,6 +44,7 @@ #include #include #include +#include static struct swit whatnowswitches[] = { #define DFOLDSW 0 @@ -447,10 +448,10 @@ WhatNow (int argc, char **argv) *(strchr(shell, '\n')) = '\0'; if (*shell == '/') - (void)annotate(drft, attach, shell, 1, 0, -1, 1); + (void)annotate(drft, attach, shell, 1, 0, -2, 1); else { (void)sprintf(file, "%s/%s", cwd, shell); - (void)annotate(drft, attach, file, 1, 0, -1, 1); + (void)annotate(drft, attach, file, 1, 0, -2, 1); } } @@ -843,8 +844,7 @@ buildfile (char **argp, char *file) while (argp[i]) i++; } - if ((args = (char **) malloc((i + 2) * sizeof(char *))) == NULL) - adios (NULL, "unable to malloc memory"); + args = (char **) mh_xmalloc((i + 2) * sizeof(char *)); /* * For backward compatibility, we need to add -build