X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frmf.c;h=273477e5fad21566dab03c723a341453afd9b139;hp=230360b8d69bb6f979a7c4501bd1fb0286c71a6f;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=5ba9c2f13fedf1d8d6ed907ef1f505616290efaa diff --git a/uip/rmf.c b/uip/rmf.c index 230360b..273477e 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -24,6 +25,8 @@ static struct swit switches[] = { { NULL, 0 } }; +char *version=VERSION; + /* ** static prototypes */ @@ -76,7 +79,7 @@ main(int argc, char **argv) if (folder) adios(EX_USAGE, NULL, "only one folder at a time!"); else - folder = getcpy(expandfol(cp)); + folder = mh_xstrdup(expandfol(cp)); } else { adios(EX_USAGE, NULL, "usage: %s [+folder] [switches]", invo_name); @@ -110,7 +113,7 @@ main(int argc, char **argv) cp = concat("Remove folder \"", folder, "\"? ", NULL); if (!getanswer(cp)) exit(EX_OK); - free(cp); + mh_free0(&cp); } if (rmf(folder) == OK) { @@ -223,7 +226,7 @@ rma(char *folder) struct node *np, *pp; alen = strlen("atr-"); - plen = strlen(cp = getcpy(toabsdir(folder))) + 1; + plen = strlen(cp = mh_xstrdup(toabsdir(folder))) + 1; /* ** Search context list for keys that look like @@ -248,5 +251,5 @@ rma(char *folder) pp = np; } } - free(cp); + mh_free0(&cp); }