projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add second wrapper ssnprintf2 to allow introduction of error handling on truncation...
[collectd.git]
/
src
/
utils
/
common
/
common.h
diff --git
a/src/utils/common/common.h
b/src/utils/common/common.h
index
addf06d
..
1ca6505
100644
(file)
--- a/
src/utils/common/common.h
+++ b/
src/utils/common/common.h
@@
-23,7
+23,7
@@
* Authors:
* Florian octo Forster <octo at collectd.org>
* Niki W. Waibel <niki.waibel@gmx.net>
* Authors:
* Florian octo Forster <octo at collectd.org>
* Niki W. Waibel <niki.waibel@gmx.net>
-**/
+
**/
#ifndef COMMON_H
#define COMMON_H
#ifndef COMMON_H
#define COMMON_H
@@
-66,6
+66,9
@@
typedef struct value_to_rate_state_s value_to_rate_state_t;
char *sstrncpy(char *dest, const char *src, size_t n);
char *sstrncpy(char *dest, const char *src, size_t n);
+__attribute__((format(printf, 3, 4))) int ssnprintf(char *str, size_t size,
+ char const *format, ...);
+
__attribute__((format(printf, 1, 2))) char *ssnprintf_alloc(char const *format,
...);
__attribute__((format(printf, 1, 2))) char *ssnprintf_alloc(char const *format,
...);