Просмотр исходного кода

libdpkg: Move checksum_offset into tar_header_checksum()

Guillem Jover лет назад: 15
Родитель
Сommit
835741f632
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      lib/dpkg/tarfn.c

+ 1 - 2
lib/dpkg/tarfn.c

@@ -59,8 +59,6 @@ struct tar_header {
 	char prefix[155];
 };
 
-static const size_t checksum_offset = offsetof(struct tar_header, checksum);
-
 /**
  * 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 int i;
+	const size_t checksum_offset = offsetof(struct tar_header, checksum);
 	long checksum;
 	long sum;