Add mention of why malloc() has to be used in snprintf.c.
authorBruce Momjian <[email protected]>
Sun, 20 Mar 2005 13:54:53 +0000 (13:54 +0000)
committerBruce Momjian <[email protected]>
Sun, 20 Mar 2005 13:54:53 +0000 (13:54 +0000)
src/port/snprintf.c

index d122026a3b3f5c93492f3534d57b373c9664ea4b..c48f7336ddcb2a4d60cc64f65029aedc8677f41a 100644 (file)
@@ -225,6 +225,7 @@ dopr(char *buffer, const char *format, va_list args, char *end)
                if (*p == '%')                  /* counts %% as two, so overcounts */
                        percents++;
 
+       /* Need to use malloc() because memory system might not be started yet. */
        if ((fmtpar = malloc(sizeof(struct fmtpar) * percents)) == NULL)
        {
                fprintf(stderr, _("out of memory\n"));