aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-21 21:52:25 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-21 21:52:25 +0000
commit851895ab80341f80398b93c9ad4aa20fcf463730 (patch)
tree53abdf274e7255fef7cf3008fcd341f946fdadbe
parent1ca20a77476fb69e2472080ef6ba23c8c0ad12ad (diff)
downloadbusybox-w32-851895ab80341f80398b93c9ad4aa20fcf463730.tar.gz
busybox-w32-851895ab80341f80398b93c9ad4aa20fcf463730.tar.bz2
busybox-w32-851895ab80341f80398b93c9ad4aa20fcf463730.zip
Clean up more local vars which shadow globals
-Erik
-rw-r--r--archival/gunzip.c8
-rw-r--r--archival/gzip.c6
-rw-r--r--gunzip.c8
-rw-r--r--gzip.c6
-rw-r--r--nfsmount.c10
-rw-r--r--util-linux/nfsmount.c10
6 files changed, 24 insertions, 24 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 8100003ec..5c97fac07 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -370,7 +370,7 @@ unsigned n; /* number of bytes in s[] */
370 register ulg c; /* temporary variable */ 370 register ulg c; /* temporary variable */
371 static unsigned long crc_32_tab[256]; 371 static unsigned long crc_32_tab[256];
372 if (crc_table_empty) { 372 if (crc_table_empty) {
373 unsigned long c; /* crc shift register */ 373 unsigned long csr; /* crc shift register */
374 unsigned long e; /* polynomial exclusive-or pattern */ 374 unsigned long e; /* polynomial exclusive-or pattern */
375 int i; /* counter for all possible eight bit values */ 375 int i; /* counter for all possible eight bit values */
376 int k; /* byte being shifted into crc apparatus */ 376 int k; /* byte being shifted into crc apparatus */
@@ -386,13 +386,13 @@ unsigned n; /* number of bytes in s[] */
386 /* Compute and print table of CRC's, five per line */ 386 /* Compute and print table of CRC's, five per line */
387 crc_32_tab[0] = 0x00000000L; 387 crc_32_tab[0] = 0x00000000L;
388 for (i = 1; i < 256; i++) { 388 for (i = 1; i < 256; i++) {
389 c = i; 389 csr = i;
390 /* The idea to initialize the register with the byte instead of 390 /* The idea to initialize the register with the byte instead of
391 * zero was stolen from Haruhiko Okumura's ar002 391 * zero was stolen from Haruhiko Okumura's ar002
392 */ 392 */
393 for (k = 8; k; k--) 393 for (k = 8; k; k--)
394 c = c & 1 ? (c >> 1) ^ e : c >> 1; 394 csr = csr & 1 ? (csr >> 1) ^ e : csr >> 1;
395 crc_32_tab[i]=c; 395 crc_32_tab[i]=csr;
396 } 396 }
397 } 397 }
398 398
diff --git a/archival/gzip.c b/archival/gzip.c
index 6c058d2b6..6369b894a 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -294,7 +294,7 @@ void lm_init (ush * flags);
294ulg deflate (void); 294ulg deflate (void);
295 295
296 /* in trees.c */ 296 /* in trees.c */
297void ct_init (ush * attr, int *method); 297void ct_init (ush * attr, int *methodp);
298int ct_tally (int dist, int lc); 298int ct_tally (int dist, int lc);
299ulg flush_block (char *buf, ulg stored_len, int eof); 299ulg flush_block (char *buf, ulg stored_len, int eof);
300 300
@@ -3299,7 +3299,7 @@ long header_bytes; /* number of bytes in gzip header */
3299int zip(in, out) 3299int zip(in, out)
3300int in, out; /* input and output file descriptors */ 3300int in, out; /* input and output file descriptors */
3301{ 3301{
3302 uch flags = 0; /* general purpose bit flags */ 3302 uch my_flags = 0; /* general purpose bit flags */
3303 ush attr = 0; /* ascii/binary flag */ 3303 ush attr = 0; /* ascii/binary flag */
3304 ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */ 3304 ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */
3305 3305
@@ -3315,7 +3315,7 @@ int in, out; /* input and output file descriptors */
3315 put_byte(GZIP_MAGIC[1]); 3315 put_byte(GZIP_MAGIC[1]);
3316 put_byte(DEFLATED); /* compression method */ 3316 put_byte(DEFLATED); /* compression method */
3317 3317
3318 put_byte(flags); /* general flags */ 3318 put_byte(my_flags); /* general flags */
3319 put_long(time_stamp); 3319 put_long(time_stamp);
3320 3320
3321 /* Write deflated file to zip file */ 3321 /* Write deflated file to zip file */
diff --git a/gunzip.c b/gunzip.c
index 8100003ec..5c97fac07 100644
--- a/gunzip.c
+++ b/gunzip.c
@@ -370,7 +370,7 @@ unsigned n; /* number of bytes in s[] */
370 register ulg c; /* temporary variable */ 370 register ulg c; /* temporary variable */
371 static unsigned long crc_32_tab[256]; 371 static unsigned long crc_32_tab[256];
372 if (crc_table_empty) { 372 if (crc_table_empty) {
373 unsigned long c; /* crc shift register */ 373 unsigned long csr; /* crc shift register */
374 unsigned long e; /* polynomial exclusive-or pattern */ 374 unsigned long e; /* polynomial exclusive-or pattern */
375 int i; /* counter for all possible eight bit values */ 375 int i; /* counter for all possible eight bit values */
376 int k; /* byte being shifted into crc apparatus */ 376 int k; /* byte being shifted into crc apparatus */
@@ -386,13 +386,13 @@ unsigned n; /* number of bytes in s[] */
386 /* Compute and print table of CRC's, five per line */ 386 /* Compute and print table of CRC's, five per line */
387 crc_32_tab[0] = 0x00000000L; 387 crc_32_tab[0] = 0x00000000L;
388 for (i = 1; i < 256; i++) { 388 for (i = 1; i < 256; i++) {
389 c = i; 389 csr = i;
390 /* The idea to initialize the register with the byte instead of 390 /* The idea to initialize the register with the byte instead of
391 * zero was stolen from Haruhiko Okumura's ar002 391 * zero was stolen from Haruhiko Okumura's ar002
392 */ 392 */
393 for (k = 8; k; k--) 393 for (k = 8; k; k--)
394 c = c & 1 ? (c >> 1) ^ e : c >> 1; 394 csr = csr & 1 ? (csr >> 1) ^ e : csr >> 1;
395 crc_32_tab[i]=c; 395 crc_32_tab[i]=csr;
396 } 396 }
397 } 397 }
398 398
diff --git a/gzip.c b/gzip.c
index 6c058d2b6..6369b894a 100644
--- a/gzip.c
+++ b/gzip.c
@@ -294,7 +294,7 @@ void lm_init (ush * flags);
294ulg deflate (void); 294ulg deflate (void);
295 295
296 /* in trees.c */ 296 /* in trees.c */
297void ct_init (ush * attr, int *method); 297void ct_init (ush * attr, int *methodp);
298int ct_tally (int dist, int lc); 298int ct_tally (int dist, int lc);
299ulg flush_block (char *buf, ulg stored_len, int eof); 299ulg flush_block (char *buf, ulg stored_len, int eof);
300 300
@@ -3299,7 +3299,7 @@ long header_bytes; /* number of bytes in gzip header */
3299int zip(in, out) 3299int zip(in, out)
3300int in, out; /* input and output file descriptors */ 3300int in, out; /* input and output file descriptors */
3301{ 3301{
3302 uch flags = 0; /* general purpose bit flags */ 3302 uch my_flags = 0; /* general purpose bit flags */
3303 ush attr = 0; /* ascii/binary flag */ 3303 ush attr = 0; /* ascii/binary flag */
3304 ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */ 3304 ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */
3305 3305
@@ -3315,7 +3315,7 @@ int in, out; /* input and output file descriptors */
3315 put_byte(GZIP_MAGIC[1]); 3315 put_byte(GZIP_MAGIC[1]);
3316 put_byte(DEFLATED); /* compression method */ 3316 put_byte(DEFLATED); /* compression method */
3317 3317
3318 put_byte(flags); /* general flags */ 3318 put_byte(my_flags); /* general flags */
3319 put_long(time_stamp); 3319 put_long(time_stamp);
3320 3320
3321 /* Write deflated file to zip file */ 3321 /* Write deflated file to zip file */
diff --git a/nfsmount.c b/nfsmount.c
index 6643ed5aa..a62df3272 100644
--- a/nfsmount.c
+++ b/nfsmount.c
@@ -735,20 +735,20 @@ int nfsmount(const char *spec, const char *node, int *flags,
735#endif 735#endif
736 } else { 736 } else {
737#if NFS_MOUNT_VERSION >= 4 737#if NFS_MOUNT_VERSION >= 4
738 fhandle3 *fhandle; 738 fhandle3 *my_fhandle;
739 if (status.nfsv3.fhs_status != 0) { 739 if (status.nfsv3.fhs_status != 0) {
740 error_msg("%s:%s failed, reason given by server: %s", 740 error_msg("%s:%s failed, reason given by server: %s",
741 hostname, dirname, 741 hostname, dirname,
742 nfs_strerror(status.nfsv3.fhs_status)); 742 nfs_strerror(status.nfsv3.fhs_status));
743 goto fail; 743 goto fail;
744 } 744 }
745 fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle; 745 my_fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle;
746 memset(data.old_root.data, 0, NFS_FHSIZE); 746 memset(data.old_root.data, 0, NFS_FHSIZE);
747 memset(&data.root, 0, sizeof(data.root)); 747 memset(&data.root, 0, sizeof(data.root));
748 data.root.size = fhandle->fhandle3_len; 748 data.root.size = my_fhandle->fhandle3_len;
749 memcpy(data.root.data, 749 memcpy(data.root.data,
750 (char *) fhandle->fhandle3_val, 750 (char *) my_fhandle->fhandle3_val,
751 fhandle->fhandle3_len); 751 my_fhandle->fhandle3_len);
752 752
753 data.flags |= NFS_MOUNT_VER3; 753 data.flags |= NFS_MOUNT_VER3;
754#endif 754#endif
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index 6643ed5aa..a62df3272 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -735,20 +735,20 @@ int nfsmount(const char *spec, const char *node, int *flags,
735#endif 735#endif
736 } else { 736 } else {
737#if NFS_MOUNT_VERSION >= 4 737#if NFS_MOUNT_VERSION >= 4
738 fhandle3 *fhandle; 738 fhandle3 *my_fhandle;
739 if (status.nfsv3.fhs_status != 0) { 739 if (status.nfsv3.fhs_status != 0) {
740 error_msg("%s:%s failed, reason given by server: %s", 740 error_msg("%s:%s failed, reason given by server: %s",
741 hostname, dirname, 741 hostname, dirname,
742 nfs_strerror(status.nfsv3.fhs_status)); 742 nfs_strerror(status.nfsv3.fhs_status));
743 goto fail; 743 goto fail;
744 } 744 }
745 fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle; 745 my_fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle;
746 memset(data.old_root.data, 0, NFS_FHSIZE); 746 memset(data.old_root.data, 0, NFS_FHSIZE);
747 memset(&data.root, 0, sizeof(data.root)); 747 memset(&data.root, 0, sizeof(data.root));
748 data.root.size = fhandle->fhandle3_len; 748 data.root.size = my_fhandle->fhandle3_len;
749 memcpy(data.root.data, 749 memcpy(data.root.data,
750 (char *) fhandle->fhandle3_val, 750 (char *) my_fhandle->fhandle3_val,
751 fhandle->fhandle3_len); 751 my_fhandle->fhandle3_len);
752 752
753 data.flags |= NFS_MOUNT_VER3; 753 data.flags |= NFS_MOUNT_VER3;
754#endif 754#endif