]> The Tcpdump Group git mirrors - libpcap/commitdiff
Shuffle the find_or_add_dev() arguments.
authorGuy Harris <[email protected]>
Tue, 1 May 2018 06:49:37 +0000 (23:49 -0700)
committerGuy Harris <[email protected]>
Tue, 1 May 2018 06:49:37 +0000 (23:49 -0700)
Put the "get more interface flags" routine pointer right after the
"interface flags" pointer.

pcap-int.h
pcap.c

index 7236f95564cf6b474bc51db08a7035b370b0964b..8c442f69ec7619c7cdb22d3eef49880c7051e499 100644 (file)
@@ -450,7 +450,7 @@ int pcap_findalldevs_interfaces(pcap_if_list_t *, char *,
            int (*)(const char *), get_if_flags_func);
 #endif
 pcap_if_t *find_or_add_dev(pcap_if_list_t *, const char *, bpf_u_int32,
-           const char *, get_if_flags_func, char *);
+           get_if_flags_func, const char *, char *);
 pcap_if_t *find_dev(pcap_if_list_t *, const char *);
 pcap_if_t *add_dev(pcap_if_list_t *, const char *, bpf_u_int32, const char *,
            char *);
diff --git a/pcap.c b/pcap.c
index d7240a866afeef58553b8a0f4bf7b01cf420069a..c7e4501cd4b1a81527c0ce8c55df4b028a4896b6 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -813,7 +813,7 @@ find_or_add_if(pcap_if_list_t *devlistp, const char *name,
         * attempt to add one.
         */
        return (find_or_add_dev(devlistp, name, pcap_flags,
-           get_if_description(name), get_flags_func, errbuf));
+           get_flags_func, get_if_description(name), errbuf));
 }
 
 /*
@@ -997,7 +997,7 @@ add_addr_to_dev(pcap_if_t *curdev,
  */
 pcap_if_t *
 find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
-    const char *description, get_if_flags_func get_flags_func, char *errbuf)
+    get_if_flags_func get_flags_func, const char *description, char *errbuf)
 {
        pcap_if_t *curdev;