]> diplodocus.org Git - nmh/commitdiff
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)
uip/whom.c

index 688950c9d7a5b63ac1dc2d9a0ace9e41d7aff667..411c4770e13dde7f6a49ca99be42adb16c98f2e4 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <h/mh.h>
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 #include <h/signals.h>
 
 #ifndef CYRUS_SASL
 #include <h/signals.h>
 
 #ifndef CYRUS_SASL
@@ -150,7 +151,7 @@ main (int argc, char **argv)
     if ((cp = context_find ("Aliasfile"))) {
        char *dp = NULL;
 
     if ((cp = context_find ("Aliasfile"))) {
        char *dp = NULL;
 
-       for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
+       for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) {
            vec[vecp++] = "-alias";
            vec[vecp++] = *ap;
        }
            vec[vecp++] = "-alias";
            vec[vecp++] = *ap;
        }