]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: hacking: remove reference to ATTRIBUTE_FORMAT
authorJán Tomko <jtomko@redhat.com>
Fri, 18 Oct 2019 21:16:46 +0000 (23:16 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 22 Oct 2019 20:15:02 +0000 (22:15 +0200)
Prefer G_GNUC_PRINTF.

Also, pick another example than virAsprintf since it may get
removed in the future.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
docs/hacking.html.in

index 01c735120a5eeb5e8e4141d611042096e12d0a47..030d7818e363a4e9c3cde9ea9d64947199c65544 100644 (file)
@@ -1379,12 +1379,12 @@ BAD:
       Whenever you add a new printf-style function, i.e., one with a format
       string argument and following "..." in its prototype, be sure to use
       gcc's printf attribute directive in the prototype.  For example, here's
-      the one for virAsprintf, in util.h:
+      the one for virCommandAddEnvFormat in vircommand.h:
     </p>
 
 <pre>
-  int virAsprintf(char **strp, const char *fmt, ...)
-      ATTRIBUTE_FORMAT(printf, 2, 3);
+  void virCommandAddEnvFormat(virCommandPtr cmd, const char *format, ...)
+      G_GNUC_PRINTF(2, 3);
 </pre>
 
     <p>