diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-01-22 12:43:51 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-22 13:12:25 +0100 |
commit | e91e221d0259b419054dcb607a70f576b4bf8bca (patch) | |
tree | adba863d6dc161ccad672202952210484f274909 /src | |
parent | 79fe88bfb8f21136bdb0619c14fc6de95ec0f6d5 (diff) | |
download | libssh-e91e221d0259b419054dcb607a70f576b4bf8bca.tar.gz libssh-e91e221d0259b419054dcb607a70f576b4bf8bca.tar.xz libssh-e91e221d0259b419054dcb607a70f576b4bf8bca.zip |
pcap: Correctly initialize sockaddr_in in ssh_pcap_context_set_file()
Error: CLANG_WARNING:
src/pcap.c:329:22: warning: The left operand of '!=' is a garbage value
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pcap.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -306,7 +306,12 @@ void ssh_pcap_context_set_file(ssh_pcap_context ctx, ssh_pcap_file pcap){ static int ssh_pcap_context_connect(ssh_pcap_context ctx) { ssh_session session=ctx->session; - struct sockaddr_in local, remote; + struct sockaddr_in local = { + .sin_family = AF_UNSPEC, + }; + struct sockaddr_in remote = { + .sin_family = AF_UNSPEC, + }; socket_t fd; socklen_t len; int rc; |