Browse Source

libdpkg: Move checksum_offset into tar_header_checksum()

Guillem Jover 15 years ago
parent
commit
835741f632
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lib/dpkg/tarfn.c

+ 1 - 2
lib/dpkg/tarfn.c

@@ -59,8 +59,6 @@ struct tar_header {
 	char prefix[155];
 	char prefix[155];
 };
 };
 
 
-static const size_t checksum_offset = offsetof(struct tar_header, checksum);
-
 /**
 /**
  * Convert an ASCII octal string to a long.
  * Convert an ASCII octal string to a long.
  */
  */
@@ -163,6 +161,7 @@ tar_header_checksum(struct tar_header *h)
 {
 {
 	unsigned char *s = (unsigned char *)h;
 	unsigned char *s = (unsigned char *)h;
 	unsigned int i;
 	unsigned int i;
+	const size_t checksum_offset = offsetof(struct tar_header, checksum);
 	long checksum;
 	long checksum;
 	long sum;
 	long sum;