]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/grupd.c
Convert devd's client socket to type SOCK_SEQPACKET.
[pw-darwin.git] / pw / grupd.c
index e9f6b5e4a5b815393376eedf1da41b1828826673..3f78e95d16913f81a053eb8748d2ec0b0fc2c32c 100644 (file)
@@ -50,12 +50,11 @@ setgrdir(const char * dir)
 {
        if (dir == NULL)
                return -1;
-       else {
-               char * d = malloc(strlen(dir)+1);
-               if (d == NULL)
-                       return -1;
-               grpath = strcpy(d, dir);
-       }
+       else
+               grpath = strdup(dir);
+       if (grpath == NULL)
+               return -1;
+
        return 0;
 }