From: Guy Harris Date: Wed, 9 Jan 2019 04:47:24 +0000 (-0800) Subject: Fix some errors. X-Git-Tag: libpcap-1.10-bp~645 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/48cedbae66803b393fd98fecf0d801a4963f45d0?ds=sidebyside Fix some errors. --- diff --git a/rpcapd/win32-svc.c b/rpcapd/win32-svc.c index 5d132a06..40c8303f 100644 --- a/rpcapd/win32-svc.c +++ b/rpcapd/win32-svc.c @@ -46,6 +46,7 @@ static void update_svc_status(DWORD state, DWORD progress_indicator); int svc_start(void) { + int rc; SERVICE_TABLE_ENTRY ste[] = { { PROGRAM_NAME, svc_main }, @@ -55,7 +56,7 @@ int svc_start(void) // This call is blocking. A new thread is created which will launch // the svc_main() function - if (StartServiceCtrlDispatcher(ste) == 0) { + if ((rc = StartServiceCtrlDispatcher(ste)) == 0) { pcap_win32_err_to_str(GetLastError(), string); rpcapd_log(LOGPRIO_ERROR, "StartServiceCtrlDispatcher() failed: %s", string); diff --git a/sockutils.c b/sockutils.c index 57bcdf66..02d9a55c 100644 --- a/sockutils.c +++ b/sockutils.c @@ -127,7 +127,6 @@ static int sock_ismcastaddr(const struct sockaddr *saddr); void sock_fmterror(const char *caller, int errcode, char *errbuf, int errbuflen) { #ifdef _WIN32 - int retval; char message[SOCK_ERRBUF_SIZE]; /* We're forcing "ANSI" */ if (errbuf == NULL)