]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix some errors.
authorGuy Harris <[email protected]>
Wed, 9 Jan 2019 04:47:24 +0000 (20:47 -0800)
committerGuy Harris <[email protected]>
Wed, 9 Jan 2019 04:47:24 +0000 (20:47 -0800)
rpcapd/win32-svc.c
sockutils.c

index 5d132a0655c53dc51193467ee083c5e8f29e5fd7..40c8303fb94c8f063c12ea052ad7c1a1c74879f7 100644 (file)
@@ -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);
index 57bcdf666370340a795219925826a65a77d12212..02d9a55ce6fc82d0bbc96745faf9a7e737b54afd 100644 (file)
@@ -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)