X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fobstack_printf.c;h=c2d0b50646856fed709ecc480d111415f08146cb;hb=cdfe647f8d29540cdfe90cef0fa568c5d2fd4481;hp=f546f006b9cefb7da55cfedea9d4a739e099f6e6;hpb=7a8101a246b1c7aa64cd2f95ad2a43a2bf2ee891;p=gnulib.git diff --git a/lib/obstack_printf.c b/lib/obstack_printf.c index f546f006b..c2d0b5064 100644 --- a/lib/obstack_printf.c +++ b/lib/obstack_printf.c @@ -58,16 +58,16 @@ obstack_vprintf (struct obstack *obs, const char *format, va_list args) stack-allocated buffer and copy, to reduce the likelihood of a small-size malloc. Otherwise, print directly into the obstack. */ - const size_t cutoff = 1024; - char buf[cutoff]; + enum { CUTOFF = 1024 }; + char buf[CUTOFF]; char *base = obstack_next_free (obs); size_t len = obstack_room (obs); char *str; - if (len < cutoff) + if (len < CUTOFF) { base = buf; - len = cutoff; + len = CUTOFF; } str = vasnprintf (base, &len, format, args); if (!str)