]> diplodocus.org Git - nmh/blobdiff - uip/install-mh.c
Alter HasSuffixC()'s char * to be const.
[nmh] / uip / install-mh.c
index ea4e876b752527de0bf6dc59d69cbc1bd545a0b1..70865337c788b7b85a08d95e79191a5b8be86fea 100644 (file)
@@ -80,8 +80,8 @@ main (int argc, char **argv)
      * the home directory field in the password file if that's not found.
      */
 
      * the home directory field in the password file if that's not found.
      */
 
-    if ((mypath = getenv("HOME")) == (char *)0) {
-       if ((pw = getpwuid(getuid())) == (struct passwd *)0 || *pw->pw_dir == '\0')
+    if ((mypath = getenv("HOME")) == NULL) {
+       if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
            adios(NULL, "cannot determine your home directory");
        else
            mypath = pw->pw_dir;
            adios(NULL, "cannot determine your home directory");
        else
            mypath = pw->pw_dir;
@@ -183,7 +183,7 @@ query:
     NEW(np);
     m_defs = np;
     np->n_name = mh_xstrdup("Path");
     NEW(np);
     m_defs = np;
     np->n_name = mh_xstrdup("Path");
-    np->n_field = getcpy (pathname);
+    np->n_field = mh_xstrdup(pathname);
     np->n_context = 0;
     np->n_next = NULL;
 
     np->n_context = 0;
     np->n_next = NULL;