X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fust%2Fusterr-signal-safe.h;h=71e7437a9c58dbb6a9d84bcfa4acb21598ac6cbb;hb=37ed587a8b9aea32c383058b4765a5730497d74a;hp=483e7f541a5b1bb6be916726422737ca167feed6;hpb=80e2814bbd91e86984f24a74cc75f9cc4aaa6824;p=ust.git diff --git a/include/ust/usterr-signal-safe.h b/include/ust/usterr-signal-safe.h index 483e7f5..71e7437 100644 --- a/include/ust/usterr-signal-safe.h +++ b/include/ust/usterr-signal-safe.h @@ -54,6 +54,8 @@ static inline int ust_debug(void) #define UST_XSTR(d) UST_STR(d) #define UST_STR(s) #s +#define USTERR_MAX_LEN 512 + /* We sometimes print in the tracing path, and tracing can occur in * signal handlers, so we must use a print method which is signal safe. */ @@ -68,8 +70,8 @@ static inline void __attribute__ ((format (printf, 1, 2))) #define sigsafe_print_err(fmt, args...) \ { \ - /* Can't use dynamic allocation. Limit ourselves to 250 chars. */ \ - char ____buf[250]; \ + /* Can't use dynamic allocation. Limit ourselves to USTERR_MAX_LEN chars. */ \ + char ____buf[USTERR_MAX_LEN]; \ int ____saved_errno; \ \ /* Save the errno. */ \