Commit 9f8ae26c authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

netapi32: Fix dead stores.

parent 6e336fe3
...@@ -415,10 +415,7 @@ static BOOL NetBTFindNameAnswerCallback(void *pVoid, WORD answerCount, ...@@ -415,10 +415,7 @@ static BOOL NetBTFindNameAnswerCallback(void *pVoid, WORD answerCount,
if (queryData->cacheEntry) if (queryData->cacheEntry)
queryData->cacheEntry->numAddresses = 0; queryData->cacheEntry->numAddresses = 0;
else else
{
ret = FALSE;
queryData->ret = NRC_OSRESNOTAV; queryData->ret = NRC_OSRESNOTAV;
}
} }
if (rLen == 6 && queryData->cacheEntry && if (rLen == 6 && queryData->cacheEntry &&
queryData->cacheEntry->numAddresses < answerCount) queryData->cacheEntry->numAddresses < answerCount)
...@@ -850,8 +847,8 @@ static UCHAR NetBTAstat(void *adapt, PNCB ncb) ...@@ -850,8 +847,8 @@ static UCHAR NetBTAstat(void *adapt, PNCB ncb)
astat->max_sess_pkt_size = 0xffff; astat->max_sess_pkt_size = 0xffff;
astat->xmit_success = adapter->xmit_success; astat->xmit_success = adapter->xmit_success;
astat->recv_success = adapter->recv_success; astat->recv_success = adapter->recv_success;
ret = NRC_GOODRET;
} }
ret = NRC_GOODRET;
} }
else else
ret = NetBTAstatRemote(adapter, ncb); ret = NetBTAstatRemote(adapter, ncb);
...@@ -1183,6 +1180,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb) ...@@ -1183,6 +1180,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
* message header. */ * message header. */
NetBIOSHangupSession(ncb); NetBIOSHangupSession(ncb);
ret = NRC_SABORT; ret = NRC_SABORT;
goto error;
} }
else if (buffer[0] != NBSS_MSG) else if (buffer[0] != NBSS_MSG)
{ {
...@@ -1190,6 +1188,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb) ...@@ -1190,6 +1188,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
FIXME("Received unexpected session msg type %d\n", buffer[0]); FIXME("Received unexpected session msg type %d\n", buffer[0]);
NetBIOSHangupSession(ncb); NetBIOSHangupSession(ncb);
ret = NRC_SABORT; ret = NRC_SABORT;
goto error;
} }
else else
{ {
...@@ -1199,6 +1198,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb) ...@@ -1199,6 +1198,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
FIXME("Received a message that's too long for my taste\n"); FIXME("Received a message that's too long for my taste\n");
NetBIOSHangupSession(ncb); NetBIOSHangupSession(ncb);
ret = NRC_SABORT; ret = NRC_SABORT;
goto error;
} }
else else
{ {
...@@ -1226,6 +1226,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb) ...@@ -1226,6 +1226,7 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
adapter->recv_success++; adapter->recv_success++;
} }
} }
error:
TRACE("returning 0x%02x\n", ret); TRACE("returning 0x%02x\n", ret);
return ret; return ret;
} }
......
...@@ -637,7 +637,7 @@ static UCHAR nbInternalHangup(NetBIOSAdapter *adapter, NetBIOSSession *session) ...@@ -637,7 +637,7 @@ static UCHAR nbInternalHangup(NetBIOSAdapter *adapter, NetBIOSSession *session)
EnterCriticalSection(&adapter->cs); EnterCriticalSection(&adapter->cs);
memset(session, 0, sizeof(NetBIOSSession)); memset(session, 0, sizeof(NetBIOSSession));
LeaveCriticalSection(&adapter->cs); LeaveCriticalSection(&adapter->cs);
return NRC_GOODRET; return ret;
} }
static UCHAR nbHangup(NetBIOSAdapter *adapter, const NCB *ncb) static UCHAR nbHangup(NetBIOSAdapter *adapter, const NCB *ncb)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment