X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=snprintf%2Fvfprintf.c;h=c2b07eb0bce59a2a0cf569de8a9cd6a4955a0294;hb=74d65852d2dcb025a00fa5abcb56f6b7521395a4;hp=ff7284867c824bab25146500c7d62fca87795870;hpb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;p=lttng-ust.git diff --git a/snprintf/vfprintf.c b/snprintf/vfprintf.c index ff728486..c2b07eb0 100644 --- a/snprintf/vfprintf.c +++ b/snprintf/vfprintf.c @@ -33,6 +33,10 @@ #include "local.h" #include "fvwrite.h" +#include "various.h" + +static char null_str[] = "(null)"; +static char bad_base_str[] = "bug in ust_safe_vfprintf: bad base"; union arg { int intarg; @@ -714,7 +718,7 @@ fp_common: goto nosign; case 's': if ((cp = GETARG(char *)) == NULL) - cp = "(null)"; + cp = null_str; if (prec >= 0) { /* * can't use strlen; can only look for the @@ -801,7 +805,7 @@ number: if ((dprec = prec) >= 0) break; default: - cp = "bug in ust_safe_vfprintf: bad base"; + cp = bad_base_str; size = strlen(cp); goto skipsize; }