[PATCH] inetcomm/smtptransport.c : Remove some unneeded variables and assigns.

Amine Khaldi amine48rz at gmail.com
Wed Dec 16 12:23:35 CST 2009


---
 dlls/inetcomm/smtptransport.c |   45 +++++++++++-----------------------------
 1 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/dlls/inetcomm/smtptransport.c b/dlls/inetcomm/smtptransport.c
index d17419f..c3d6707 100644
--- a/dlls/inetcomm/smtptransport.c
+++ b/dlls/inetcomm/smtptransport.c
@@ -127,12 +127,10 @@ static void SMTPTransport_CallbackProcessDATAResponse(IInternetTransport *iface,
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -161,12 +159,10 @@ static void SMTPTransport_CallbackProcessMAILResponse(IInternetTransport *iface,
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -195,15 +191,13 @@ static void SMTPTransport_CallbackProcessRCPTResponse(IInternetTransport *iface,
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
 
     TRACE("\n");
 
     HeapFree(GetProcessHeap(), 0, This->addrlist);
     This->addrlist = NULL;
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -232,12 +226,10 @@ static void SMTPTransport_CallbackProcessHelloResp(IInternetTransport *iface, ch
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -284,15 +276,13 @@ static void SMTPTransport_CallbackSendHello(IInternetTransport *iface, char *pBu
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
     const char *pszHello;
     char *pszCommand;
     const char szHostName[] = "localhost"; /* FIXME */
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -334,14 +324,12 @@ static void SMTPTransport_CallbackDisconnect(IInternetTransport *iface, char *pB
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response;
-    HRESULT hr;
 
     TRACE("\n");
 
     if (pBuffer)
     {
-        hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-        if (FAILED(hr))
+        if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
         {
             /* FIXME: handle error */
             return;
@@ -361,12 +349,10 @@ static void SMTPTransport_CallbackMessageProcessResponse(IInternetTransport *ifa
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response = { 0 };
-    HRESULT hr;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -403,14 +389,12 @@ static void SMTPTransport_CallbackMessageSendDataStream(IInternetTransport *ifac
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response;
-    HRESULT hr;
     char *pszBuffer;
     ULONG cbSize;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -424,8 +408,7 @@ static void SMTPTransport_CallbackMessageSendDataStream(IInternetTransport *ifac
     }
 
     pszBuffer = HeapAlloc(GetProcessHeap(), 0, This->pending_message.cbSize);
-    hr = IStream_Read(This->pending_message.pstmMsg, pszBuffer, This->pending_message.cbSize, NULL);
-    if (FAILED(hr))
+    if (FAILED(IStream_Read(This->pending_message.pstmMsg, pszBuffer, This->pending_message.cbSize, NULL)))
     {
         /* FIXME: handle error */
         return;
@@ -436,7 +419,7 @@ static void SMTPTransport_CallbackMessageSendDataStream(IInternetTransport *ifac
 
     /* FIXME: properly stream the message rather than writing it all at once */
 
-    hr = InternetTransport_Write(&This->InetTransport, pszBuffer, cbSize,
+    InternetTransport_Write(&This->InetTransport, pszBuffer, cbSize,
         SMTPTransport_CallbackMessageSendDOT);
 
     HeapFree(GetProcessHeap(), 0, pszBuffer);
@@ -464,12 +447,10 @@ static void SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char
 {
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPRESPONSE response;
-    HRESULT hr;
 
     TRACE("\n");
 
-    hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
-    if (FAILED(hr))
+    if (FAILED(SMTPTransport_ParseResponse(This, pBuffer, &response)))
     {
         /* FIXME: handle error */
         return;
@@ -502,7 +483,7 @@ static void SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char
                 This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].szEmail);
 
             This->ulCurrentAddressIndex++;
-            hr = InternetTransport_DoCommand(&This->InetTransport, szCommand,
+            InternetTransport_DoCommand(&This->InetTransport, szCommand,
                 SMTPTransport_CallbackMessageReadToResponse);
 
             HeapFree(GetProcessHeap(), 0, szCommand);
@@ -510,7 +491,7 @@ static void SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char
         }
     }
 
-    hr = InternetTransport_DoCommand(&This->InetTransport, "DATA\n",
+    InternetTransport_DoCommand(&This->InetTransport, "DATA\n",
         SMTPTransport_CallbackMessageReadDataResponse);
 }
 
-- 
1.6.5.1.1367.gcd48


--------------060109020904030002000606--



More information about the wine-patches mailing list