util: Don't cast returns from malloc()
[openafs.git] / src / util / dirpath.c
index b307184..3e76824 100644 (file)
@@ -569,7 +569,7 @@ ConstructLocalPath(const char *cpath, const char *relativeTo,
            /* construct path relative to install directory only */
            pathSize += strlen(cpath);
 
-           newPath = (char *)malloc(pathSize);
+           newPath = malloc(pathSize);
            if (!newPath) {
                status = ENOMEM;
            } else {
@@ -579,7 +579,7 @@ ConstructLocalPath(const char *cpath, const char *relativeTo,
            /* construct path relative to 'relativeTo' (and install dir) */
            pathSize += strlen(relativeTo) + 1 + strlen(cpath);
 
-           newPath = (char *)malloc(pathSize);
+           newPath = malloc(pathSize);
            if (!newPath) {
                status = ENOMEM;
            } else {