]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
client: avoid -Waddress warning by comparing to NULL
authorVincent Bernat <vincent@bernat.im>
Tue, 15 Dec 2015 09:38:34 +0000 (10:38 +0100)
committerVincent Bernat <vincent@bernat.im>
Tue, 15 Dec 2015 09:38:34 +0000 (10:38 +0100)
src/client/writer.h

index ea2d4cfff9bde473976fd96ef03810f21401172d..18737801740ece8253484225857c77b71a687335 100644 (file)
@@ -33,7 +33,7 @@ struct writer {
 #define tag_attr(w,...)                w->attr(w,## __VA_ARGS__)
 #define tag_data(w,...)                w->data(w,## __VA_ARGS__)
 #define tag_end(w,...)         w->end(w,## __VA_ARGS__)
-#define tag_datatag(w,t,d,v)   do { if (!(v)) break; w->start(w,t,d); w->data(w,v); w->end(w); } while(0);
+#define tag_datatag(w,t,d,v)   do { if ((v) != NULL) break; w->start(w,t,d); w->data(w,v); w->end(w); } while(0);
 
 extern struct writer * txt_init( FILE * );
 extern struct writer * kv_init( FILE * );