]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Add missing argument in some call to LLOG_INFO in lldp.c.
authorVincent Bernat <bernat@luffy.cx>
Mon, 17 Aug 2009 17:46:28 +0000 (19:46 +0200)
committerVincent Bernat <bernat@luffy.cx>
Wed, 30 Sep 2009 12:21:20 +0000 (14:21 +0200)
This fixes #17. Also add __attribute__ to log_* functions to let gcc
automatically check for this.

src/lldp.c
src/lldpd.h

index 269f344daf68922637204853eee8d500599d284e..878a8dcd3237788b7f29e90f4b951e4073ac04d3 100644 (file)
@@ -557,6 +557,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s,
                                            ((policy >> 24) > LLDPMED_APPTYPE_LAST)) {
                                                LLOG_INFO("unknown policy field %d "
                                                    "received on %s",
+                                                   policy,
                                                    hardware->h_ifname);
                                                break;
                                        }
index 19683ed5381b248a2cd9faccf01b795e17097dd2..7063f1d8b51f94d7ba917f3f80cd6bfcf5d04215 100644 (file)
@@ -403,13 +403,13 @@ char      *dmi_asset();
 
 /* log.c */
 void             log_init(int);
-void             log_warn(const char *, ...);
+void             log_warn(const char *, ...) __attribute__ ((format (printf, 1, 2)));
 #define LLOG_WARN(x,...) log_warn("%s: " x, __FUNCTION__, ##__VA_ARGS__)
-void             log_warnx(const char *, ...);
+void             log_warnx(const char *, ...) __attribute__ ((format (printf, 1, 2)));
 #define LLOG_WARNX(x,...) log_warnx("%s: " x,  __FUNCTION__, ##__VA_ARGS__)
-void             log_info(const char *, ...);
+void             log_info(const char *, ...) __attribute__ ((format (printf, 1, 2)));
 #define LLOG_INFO(x,...) log_info("%s: " x, __FUNCTION__, ##__VA_ARGS__)
-void             log_debug(const char *, ...);
+void             log_debug(const char *, ...) __attribute__ ((format (printf, 1, 2)));
 #define LLOG_DEBUG(x,...) log_debug("%s: " x, __FUNCTION__, ##__VA_ARGS__)
 void             fatal(const char *);
 void             fatalx(const char *);