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 | a1763b39a3349cf47ea476721eb8098848170e66 (patch) | |
tree | b9afb894d8c6b9f882222eaa3af624d3b8251f8d /source3/tdb/tdb.h | |
parent | bf43c1ae13154839e49eea7602dac6701669ba26 (diff) | |
download | samba-a1763b39a3349cf47ea476721eb8098848170e66.tar.gz samba-a1763b39a3349cf47ea476721eb8098848170e66.tar.bz2 samba-a1763b39a3349cf47ea476721eb8098848170e66.zip |
r2239: Fixup formatting errors in TDB_LOG calls. Add printf attribute support to
tdb log functions.
(This used to be commit 67c737118faaeae9bd723516ea60657046e135a8)
Diffstat (limited to 'source3/tdb/tdb.h')
-rw-r--r-- | source3/tdb/tdb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h index c28e10af69..3db676a633 100644 --- a/source3/tdb/tdb.h +++ b/source3/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; |