close_lock_file(): exit (successfully) if file is already closed
[gitweb.git] / sh-i18n--envsubst.c
index 6dd03a974ae9a5063c40cd50e0c6e7645afca971..2842a22d7fdda33d62d617d5ba9b826ad428c17e 100644 (file)
@@ -208,11 +208,8 @@ string_list_append (string_list_ty *slp, const char *s)
   /* Grow the list.  */
   if (slp->nitems >= slp->nitems_max)
     {
-      size_t nbytes;
-
       slp->nitems_max = slp->nitems_max * 2 + 4;
-      nbytes = slp->nitems_max * sizeof (slp->item[0]);
-      slp->item = (const char **) xrealloc (slp->item, nbytes);
+      REALLOC_ARRAY(slp->item, slp->nitems_max);
     }
 
   /* Add the string to the end of the list.  */