X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fforw.c;h=d8d69f7865049d1c23c24475e9555b80ea2adc7a;hp=4bb03d34d3cfcb6738f4d82a85fa2d8093be5a52;hb=d4bcca1aa235370bc20bc2734c0cd6f700b17871;hpb=1f8deea066cec81699c76bc4f8021fab658aae73 diff --git a/uip/forw.c b/uip/forw.c index 4bb03d3..d8d69f7 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -153,13 +153,13 @@ 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 { msgs[msgp++] = cp; } } - cwd = getcpy(pwd()); + cwd = mh_xstrdup(pwd()); strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond), sizeof(drft)); /* @@ -233,10 +233,10 @@ main(int argc, char **argv) if (digest) { snprintf(buf, sizeof(buf), IFORMAT, digest); snprintf(value, sizeof(value), "%d", issue); - context_replace(buf, getcpy(value)); + context_replace(buf, mh_xstrdup(value)); snprintf(buf, sizeof(buf), VFORMAT, digest); snprintf(value, sizeof(value), "%d", volume); - context_replace(buf, getcpy(value)); + context_replace(buf, mh_xstrdup(value)); } context_replace(curfolder, folder); /* update current folder */ @@ -316,7 +316,7 @@ build_form(char *form, char *digest, int volume, int issue) cptr->c_text = digest; FINDCOMP(cptr, "date"); if (cptr) - cptr->c_text = getcpy(dtimenow()); + cptr->c_text = mh_xstrdup(dtimenow()); dat[0] = issue; dat[1] = volume; @@ -333,10 +333,10 @@ build_form(char *form, char *digest, int volume, int issue) if ((in = dup(fileno(tmp))) == NOTOK) adios(EX_OSERR, "dup", "unable to"); - line = mh_xmalloc((unsigned) fmtsize); + line = mh_xcalloc(fmtsize, sizeof(char)); fmt_scan(fmt, line, fmtsize, dat); fputs(line, tmp); - free(line); + mh_free0(&line); if (fclose(tmp)) adios(EX_IOERR, tmpfil, "error writing");