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

libdpkg: Rename nameLength to name_len in tar_extractor()

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

+ 5 - 5
lib/dpkg/tarfn.c

@@ -249,7 +249,7 @@ tar_extractor(void *ctx, const struct tar_operations *ops)
 	h.linkname = NULL;
 	h.linkname = NULL;
 
 
 	while ((status = ops->read(ctx, buffer, TARBLKSZ)) == TARBLKSZ) {
 	while ((status = ops->read(ctx, buffer, TARBLKSZ)) == TARBLKSZ) {
-		int nameLength;
+		int name_len;
 
 
 		if (!DecodeTarHeader(buffer, &h)) {
 		if (!DecodeTarHeader(buffer, &h)) {
 			if (h.name[0] == '\0') {
 			if (h.name[0] == '\0') {
@@ -282,19 +282,19 @@ tar_extractor(void *ctx, const struct tar_operations *ops)
 			break;
 			break;
 		}
 		}
 
 
-		nameLength = strlen(h.name);
+		name_len = strlen(h.name);
 
 
 		switch (h.type) {
 		switch (h.type) {
 		case tar_filetype_file:
 		case tar_filetype_file:
 			/* Compatibility with pre-ANSI ustar. */
 			/* Compatibility with pre-ANSI ustar. */
-			if (h.name[nameLength - 1] != '/') {
+			if (h.name[name_len - 1] != '/') {
 				status = ops->extract_file(ctx, &h);
 				status = ops->extract_file(ctx, &h);
 				break;
 				break;
 			}
 			}
 			/* Else, fall through. */
 			/* Else, fall through. */
 		case tar_filetype_dir:
 		case tar_filetype_dir:
-			if (h.name[nameLength - 1] == '/') {
-				h.name[nameLength - 1] = '\0';
+			if (h.name[name_len - 1] == '/') {
+				h.name[name_len - 1] = '\0';
 			}
 			}
 			status = ops->mkdir(ctx, &h);
 			status = ops->mkdir(ctx, &h);
 			break;
 			break;