From: Ralph Corderoy Date: Tue, 18 Oct 2016 13:52:26 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3c6162454051474257625e7e459fbd30939d7b95?ds=inline Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 2ba52b1e..327a1ee4 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -622,7 +622,7 @@ anno (int fd, struct stat *st) advise (NULL, "unable to fork, so doing annotations by hand..."); if (cwd == NULL) - cwd = getcpy (pwd ()); + cwd = mh_xstrdup(pwd ()); case OK: /* block a few signals */ @@ -701,7 +701,7 @@ annoaux (int fd) } else fd2 = NOTOK; - for (ap = brkstring (cp = getcpy (cp), " ", NULL); *ap; ap++) + for (ap = brkstring (cp = mh_xstrdup(cp), " ", NULL); *ap; ap++) m_convert (mp, *ap); free (cp); if (fd2 != NOTOK) @@ -823,9 +823,9 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc, errbuf); vec[(*vecp)++] = mh_xstrdup("-authservice"); - vec[(*vecp)++] = getcpy(auth_svc); + vec[(*vecp)++] = mh_xstrdup(auth_svc); vec[(*vecp)++] = mh_xstrdup("-oauthcredfile"); - vec[(*vecp)++] = getcpy(mh_oauth_cred_fn(auth_svc)); + vec[(*vecp)++] = mh_xstrdup(mh_oauth_cred_fn(auth_svc)); vec[(*vecp)++] = mh_xstrdup("-oauthclientid"); vec[(*vecp)++] = getcpy(svc.client_id); vec[(*vecp)++] = mh_xstrdup("-oauthclientsecret");