]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libutil/login_cap.c
Re-apply r336625 which was reverted with r336638, now that the underlying
[pw-darwin.git] / libutil / login_cap.c
index 9c8d4a689750c078e728316ca3fea805d641bbbb..cea7630698af708063f6ef1b01e36a73a2abd610 100644 (file)
@@ -86,7 +86,7 @@ allocarray(size_t sz)
 
     if (sz <= internal_arraysz)
        p = internal_array;
-    else if ((p = realloc(internal_array, sz * sizeof(char*))) != NULL) {
+    else if ((p = reallocarray(internal_array, sz, sizeof(char*))) != NULL) {
        internal_arraysz = sz;
        internal_array = p;
     }