]> git.marmaro.de Git - mmh/blobdiff - sbr/folder_realloc.c
* patch #3967: Create a mh_xrealloc function to prevent mistakes when
[mmh] / sbr / folder_realloc.c
index 753da2ec0b8867de2154c8fbf3509aaae93218d3..e7c4bc442bb6955da611d1c99fe72b3d84f6d392 100644 (file)
@@ -47,10 +47,7 @@ folder_realloc (struct msgs *mp, int lo, int hi)
         * status array.  So we don't have to move anything and can
         * just realloc the message status array.
         */
-       if (!(mp->msgstats = realloc (mp->msgstats, MSGSTATSIZE(mp, lo, hi)))) {
-           advise (NULL, "unable to reallocate message storage");
-           return NULL;
-       }
+       mp->msgstats = mh_xrealloc (mp->msgstats, MSGSTATSIZE(mp, lo, hi));
     } else {
        /*
         * We are changing the offset of the message status