Put PRINTF_ATTRIBUTE on talloc_init_named, talloc_asprintf,
authorMartin Pool <mbp@samba.org>
Wed, 19 Dec 2001 05:02:42 +0000 (05:02 +0000)
committerMartin Pool <mbp@samba.org>
Wed, 19 Dec 2001 05:02:42 +0000 (05:02 +0000)
talloc_vasprintf.

source/include/talloc.h
source/lib/talloc.c

index 8e20cc028adcbddfa533c7debd4b3756aef0408d..fb2fb6a0c39b59338cde331c22abdc84233675f1 100644 (file)
@@ -42,4 +42,12 @@ typedef struct {
        char *name;
 } TALLOC_CTX;
 
+TALLOC_CTX *talloc_init_named(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
+
+char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap)
+       PRINTF_ATTRIBUTE(2, 0);
+
+char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
+       PRINTF_ATTRIBUTE(2, 3);
+
 #endif
index ff1bdd000079dc9a715873f339fa48b233532ebd..45f9ed8004c30941c25c55d00b498663fa360809 100644 (file)
@@ -62,7 +62,7 @@ TALLOC_CTX *talloc_init(void)
  * Create a new talloc context, with a name specifying its purpose.
  * Please call this in preference to talloc_init().
  **/
-TALLOC_CTX *talloc_init_named(char const *fmt, ...)
+ TALLOC_CTX *talloc_init_named(char const *fmt, ...) 
 {
        TALLOC_CTX *t;
        va_list ap;
@@ -197,7 +197,7 @@ char *talloc_strdup(TALLOC_CTX *t, const char *p)
  * Perform string formatting, and return a pointer to newly allocated
  * memory holding the result, inside a memory pool.
  **/
-char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
+ char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
 {
        va_list ap;
        char *ret;
@@ -210,7 +210,7 @@ char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
 }
 
 
-char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap)
+ char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap)
 {      
        int len;
        char *ret;