Skip to content

Commit

Permalink
usb: storage: sddr09: initialize variables directly
Browse files Browse the repository at this point in the history
Clean up the code a bit to initialize the variables directly when
defining them.

Signed-off-by: Emilio López <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
elopez authored and gregkh committed May 17, 2013
1 parent 9e873d4 commit 4cb4f83
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/usb/storage/sddr09.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,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++) {
Expand Down

0 comments on commit 4cb4f83

Please sign in to comment.