X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.h;h=317be8d1579d063cc23338e229abcdede533da84;hb=80be251e335e8da43788ec50cec29bb38e11c24b;hp=7c0d9369cf498db70712958a6d593ccb0d58d3e8;hpb=7224f5d4b999b2f2809ffa00d68361984386fdb0;p=collectd.git diff --git a/src/common.h b/src/common.h index 7c0d9369..317be8d1 100644 --- a/src/common.h +++ b/src/common.h @@ -56,7 +56,13 @@ struct rate_to_value_state_s typedef struct rate_to_value_state_s rate_to_value_state_t; char *sstrncpy (char *dest, const char *src, size_t n); + +__attribute__ ((format(printf,3,4))) int ssnprintf (char *dest, size_t n, const char *format, ...); + +__attribute__ ((format(printf,1,2))) +char *ssnprintf_alloc (char const *format, ...); + char *sstrdup(const char *s); void *smalloc(size_t size); char *sstrerror (int errnum, char *buf, size_t buflen);