X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Finclude%2Futils%2Ferror.h;h=2c3df32ff48a98c2fe7f26e03fe1593c55acbb82;hp=e170a7d5e85109406a15af21d4247daa27cd0083;hb=f78d30d42f9fe3b58f1c2132cafe4c8687b8bd46;hpb=44a0aa91ac18582aa7415943dc37d06220576443 diff --git a/src/include/utils/error.h b/src/include/utils/error.h index e170a7d..2c3df32 100644 --- a/src/include/utils/error.h +++ b/src/include/utils/error.h @@ -43,11 +43,6 @@ extern "C" { #endif -/* max length of any error message */ -#ifndef SDB_MAX_ERROR -# define SDB_MAX_ERROR 4096 -#endif /* ! SDB_MAX_ERROR */ - /* On Linux systems and possibly others, this should be the same as the LOG_ * constants defined by syslog. */ enum { @@ -85,7 +80,8 @@ sdb_error_set_logger(int (*f)(int, const char *)); * on configuration, try a clean shut-down of the process. */ int -sdb_log(int prio, const char *fmt, ...); +sdb_log(int prio, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); /* * sdb_error_set, sdb_error_append: @@ -94,9 +90,11 @@ sdb_log(int prio, const char *fmt, ...); * be done. */ int -sdb_error_set(const char *fmt, ...); +sdb_error_set(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); int -sdb_error_append(const char *fmt, ...); +sdb_error_append(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); /* * sdb_error_chomp: