usb: storage: alauda: initialize variables directly
authorEmilio López <emilio@elopez.com.ar>
Sun, 12 May 2013 14:43:23 +0000 (11:43 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2013 00:48:28 +0000 (17:48 -0700)
Clean up the code a bit to initialize the variables directly when
defining them.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/alauda.c

index 77a2ddfe64875ce83644db2a462ec17465e3ea2a..6636a583da126bff3138d5a9d3a711224e5974d6 100644 (file)
@@ -249,11 +249,7 @@ static void nand_init_ecc(void) {
 /* compute 3-byte ecc on 256 bytes */
 static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) {
        int i, j, a;
-       unsigned char par, bit, bits[8];
-
-       par = 0;
-       for (j = 0; j < 8; j++)
-               bits[j] = 0;
+       unsigned char par = 0, bit, bits[8] = {0};
 
        /* collect 16 checksum bits */
        for (i = 0; i < 256; i++) {