diff options
author | Jim McDonough <jmcd@samba.org> | 2004-09-07 13:51:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:37 -0500 |
commit | 67c737118faaeae9bd723516ea60657046e135a8 (patch) | |
tree | ab56fa32219db84365ea7fb8e11a19bc462c20a3 /source/tdb/tdb.h | |
parent | 8470968cc6884605cdf2587a2c7f9ecf7b46ded6 (diff) | |
download | samba-67c737118faaeae9bd723516ea60657046e135a8.tar.gz samba-67c737118faaeae9bd723516ea60657046e135a8.tar.xz samba-67c737118faaeae9bd723516ea60657046e135a8.zip |
r2239: Fixup formatting errors in TDB_LOG calls. Add printf attribute support to
tdb log functions.
Diffstat (limited to 'source/tdb/tdb.h')
-rw-r--r-- | source/tdb/tdb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/tdb/tdb.h b/source/tdb/tdb.h index c28e10af693..3db676a633f 100644 --- a/source/tdb/tdb.h +++ b/source/tdb/tdb.h @@ -31,6 +31,9 @@ extern "C" { #endif +#ifndef PRINTF_ATTRIBUTE +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#endif /* flags to tdb_store() */ #define TDB_REPLACE 1 @@ -101,7 +104,7 @@ typedef struct tdb_context { struct tdb_context *next; /* all tdbs to avoid multiple opens */ dev_t device; /* uniquely identifies this tdb */ ino_t inode; /* uniquely identifies this tdb */ - void (*log_fn)(struct tdb_context *tdb, int level, const char *, ...); /* logging function */ + void (*log_fn)(struct tdb_context *tdb, int level, const char *, ...) PRINTF_ATTRIBUTE(3,4); /* logging function */ u32 (*hash_fn)(TDB_DATA *key); int open_flags; /* flags used in the open - needed by reopen */ } TDB_CONTEXT; |