Skip to content

Commit

Permalink
- Fix unbound dnstap socket test program analyzer warnings about
Browse files Browse the repository at this point in the history
  unused variable assignments and variable initialization.
  • Loading branch information
wcawijngaards committed Sep 30, 2024
1 parent 3a1b79f commit 5bb3b9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dnstap/unbound-dnstap-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,9 @@ void dtio_mainfdcallback(int fd, short ATTR_UNUSED(bits), void* arg)
char* id = NULL;
struct sockaddr_storage addr;
socklen_t addrlen = (socklen_t)sizeof(addr);
int s = accept(fd, (struct sockaddr*)&addr, &addrlen);
int s;
memset(&addr, 0, sizeof(addr));
s = accept(fd, (struct sockaddr*)&addr, &addrlen);
if(s == -1) {
#ifndef USE_WINSOCK
/* EINTR is signal interrupt. others are closed connection. */
Expand Down Expand Up @@ -1543,8 +1545,8 @@ int main(int argc, char** argv)
usage(argv);
}
}
argc -= optind;
argv += optind;
/* argc -= optind; not using further arguments */
/* argv += optind; not using further arguments */

if(usessl) {
#ifdef HAVE_SSL
Expand Down
2 changes: 2 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
30 September 2024: Wouter
- Fix negative cache NSEC3 parameter compares for zero length NSEC3
salt.
- Fix unbound dnstap socket test program analyzer warnings about
unused variable assignments and variable initialization.

25 September 2024: Wouter
- Fix #1144: [FR] log timestamps in ISO8601 format with timezone.
Expand Down

0 comments on commit 5bb3b9c

Please sign in to comment.