diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-12-25 00:46:46 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-12-25 00:46:46 -0800 |
commit | 46d4ce59e73c19b8596158f6817e6259abb78927 (patch) | |
tree | df27a23a70cc830f04e892c7e0e527cce7d5d504 /pcap | |
parent | 3f573ed8e49157f187e8024bd2952110abc86541 (diff) | |
download | libpcap-46d4ce59e73c19b8596158f6817e6259abb78927.tar.gz |
More constification of arguments.
We don't modify the source argument to pcap_findalldevs_ex(), so make
that a promise, so compilers don't get upset when a constant string is
passed.
See, for example:
https://stackoverflow.com/questions/52397129/winpcap-findalldevs-const-char-incompatible-to-char
Diffstat (limited to 'pcap')
-rw-r--r-- | pcap/pcap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap/pcap.h b/pcap/pcap.h index e13e7ee2..8b5ecba5 100644 --- a/pcap/pcap.h +++ b/pcap/pcap.h @@ -845,8 +845,8 @@ PCAP_API int pcap_parsesrcstr(const char *source, int *type, char *host, * For listing remote capture devices, pcap_findalldevs_ex() is currently * the only API available. */ -PCAP_API int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, - pcap_if_t **alldevs, char *errbuf); +PCAP_API int pcap_findalldevs_ex(const char *source, + struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); /* * Sampling methods. |