diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2007-07-19 01:47:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 10:04:43 -0700 |
commit | cb00ea3528eb3c09eae9871d6e7d038776e952e2 (patch) | |
tree | b87eae0b060f37bedf01b52ccad6034d1df4f376 /fs/udf/crc.c | |
parent | 95a631e2d9853c9138e14fbaa9a51e6451f040b4 (diff) |
UDF: coding style conversion - lindent
This patch converts UDF coding style to kernel coding style using Lindent.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/crc.c')
-rw-r--r-- | fs/udf/crc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/udf/crc.c b/fs/udf/crc.c index ef2bfaa19d7..ae3d4979094 100644 --- a/fs/udf/crc.c +++ b/fs/udf/crc.c @@ -79,8 +79,7 @@ static uint16_t crc_table[256] = { * July 21, 1997 - Andrew E. Mileski * Adapted from OSTA-UDF(tm) 1.50 standard. */ -uint16_t -udf_crc(uint8_t *data, uint32_t size, uint16_t crc) +uint16_t udf_crc(uint8_t * data, uint32_t size, uint16_t crc) { while (size--) crc = crc_table[(crc >> 8 ^ *(data++)) & 0xffU] ^ (crc << 8); @@ -112,7 +111,7 @@ int main(void) return 0; } -#endif /* defined(TEST) */ +#endif /* defined(TEST) */ /****************************************************************************/ #if defined(GENERATE) @@ -138,7 +137,7 @@ int main(int argc, char **argv) /* Get the polynomial */ sscanf(argv[1], "%lo", &poly); - if (poly & 0xffff0000U){ + if (poly & 0xffff0000U) { fprintf(stderr, "polynomial is too large\en"); exit(1); } @@ -147,22 +146,22 @@ int main(int argc, char **argv) /* Create a table */ printf("static unsigned short crc_table[256] = {\n"); - for (n = 0; n < 256; n++){ + for (n = 0; n < 256; n++) { if (n % 8 == 0) printf("\t"); crc = n << 8; - for (i = 0; i < 8; i++){ - if(crc & 0x8000U) + for (i = 0; i < 8; i++) { + if (crc & 0x8000U) crc = (crc << 1) ^ poly; else crc <<= 1; - crc &= 0xFFFFU; + crc &= 0xFFFFU; } if (n == 255) printf("0x%04xU ", crc); else printf("0x%04xU, ", crc); - if(n % 8 == 7) + if (n % 8 == 7) printf("\n"); } printf("};\n"); @@ -170,4 +169,4 @@ int main(int argc, char **argv) return 0; } -#endif /* defined(GENERATE) */ +#endif /* defined(GENERATE) */ |