fix client/smartcard: indentation and return value
authorBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 14 Dec 2017 15:21:19 +0000 (16:21 +0100)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 14 Dec 2017 15:21:19 +0000 (16:21 +0100)
Integrate feedback from pull request review.

channels/smartcard/client/smartcard_operations.c
channels/smartcard/client/smartcard_pack.c
channels/smartcard/client/smartcard_pack.h

index 8183194..91f14a7 100644 (file)
@@ -773,7 +773,7 @@ static LONG smartcard_ConnectA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA
        if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret)))
        {
                WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %"PRId32"", status);
-        goto out_fail;
+               goto out_fail;
        }
 
        status = ret.ReturnCode;
index fed0d2a..c5d66c1 100644 (file)
@@ -75,13 +75,12 @@ LONG smartcard_unpack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s
        return SCARD_S_SUCCESS;
 }
 
-LONG smartcard_pack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s)
+void smartcard_pack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s)
 {
        Stream_Write_UINT8(s, 1); /* Version (1 byte) */
        Stream_Write_UINT8(s, 0x10); /* Endianness (1 byte) */
        Stream_Write_UINT16(s, 8); /* CommonHeaderLength (2 bytes) */
        Stream_Write_UINT32(s, 0xCCCCCCCC); /* Filler (4 bytes), should be 0xCCCCCCCC */
-       return SCARD_S_SUCCESS;
 }
 
 LONG smartcard_unpack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s)
@@ -116,12 +115,11 @@ LONG smartcard_unpack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream*
        return SCARD_S_SUCCESS;
 }
 
-LONG smartcard_pack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s,
+void smartcard_pack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s,
                                         UINT32 objectBufferLength)
 {
        Stream_Write_UINT32(s, objectBufferLength); /* ObjectBufferLength (4 bytes) */
        Stream_Write_UINT32(s, 0x00000000); /* Filler (4 bytes), should be 0x00000000 */
-       return SCARD_S_SUCCESS;
 }
 
 LONG smartcard_unpack_read_size_align(SMARTCARD_DEVICE* smartcard, wStream* s, UINT32 size,
index 19c0954..f7bc083 100644 (file)
@@ -452,10 +452,10 @@ void smartcard_scard_handle_native_to_redir(SMARTCARD_DEVICE* smartcard, REDIR_S
         SCARDHANDLE hCard);
 
 LONG smartcard_unpack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s);
-LONG smartcard_pack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s);
+void smartcard_pack_common_type_header(SMARTCARD_DEVICE* smartcard, wStream* s);
 
 LONG smartcard_unpack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s);
-LONG smartcard_pack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s,
+void smartcard_pack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* s,
                                         UINT32 objectBufferLength);
 
 LONG smartcard_unpack_redir_scard_context(SMARTCARD_DEVICE* smartcard, wStream* s,