X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsend.c;h=619ff628eb88b8c07109453aa89a24c5a5485937;hp=bab1699773f585d4e472e7b2139f65ec1ac1be16;hb=1fb6287fc4986668e8f49d7c3bdca27d53e267af;hpb=5b389106e9bfb05edbbcbdc847e09437f2390da0 diff --git a/uip/send.c b/uip/send.c index bab1699..619ff62 100644 --- a/uip/send.c +++ b/uip/send.c @@ -162,7 +162,7 @@ main(int argc, char **argv) for (nmsgs = 0, msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected(mp, msgnum)) { - files[nfiles++] = getcpy(m_name(msgnum)); + files[nfiles++] = mh_xstrdup(m_name(msgnum)); unset_exists(mp, msgnum); } } @@ -196,7 +196,7 @@ main(int argc, char **argv) adios(EX_IOERR, altmsg, "unable to open for reading"); } fstat(in, &st2); - distfile = getcpy(m_mktemp2(NULL, invo_name, NULL, NULL)); + distfile = mh_xstrdup(m_mktemp2(NULL, invo_name, NULL, NULL)); if ((out = creat(distfile, (int)st2.st_mode & 0777))==NOTOK) { adios(EX_IOERR, distfile, "unable to open for writing"); } @@ -322,10 +322,10 @@ sendsbr(char **vec, int vecp, char *drft, struct stat *st) static int contains_non_ascii(char *str) { - char *cp; + unsigned char *cp; for (cp = str; *cp; cp++) { - if (*cp > 127 || *cp < 0) { + if (*cp > 127) { return 1; } } @@ -348,7 +348,7 @@ attach(char *draft_file_name) } /* We'll grow the buffer as needed. */ - field = (char *)mh_xmalloc(field_size = 256); + field = mh_xcalloc(field_size = 256, sizeof(char)); /* ** Scan the draft file for an attachment header field name. @@ -484,7 +484,7 @@ signandenc(char *draft_file_name) } /* We'll grow the buffer as needed. */ - field = (char *)mh_xmalloc(field_size = 256); + field = mh_xcalloc(field_size = 256, sizeof(char)); /* Scan the draft file for an attachment header field name. */ while (get_line() != EOF && *field != '\0' && *field != '-') { @@ -553,7 +553,7 @@ get_line(void) break; } if (++n >= field_size - 1) { - field = (char *)mh_xrealloc(field, field_size += 256); + field = mh_xrealloc(field, field_size += 256); p = field + n - 1; } }