Skip to content

Commit

Permalink
Remove the unused variable detected_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Mar 5, 2022
1 parent 12b8cc5 commit a4c3c90
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libarchive/archive_read_support_format_mtree.c
Expand Up @@ -692,7 +692,7 @@ detect_form(struct archive_read *a, int *is_form_d)
{
const char *p;
ssize_t avail, ravail;
ssize_t detected_bytes = 0, len, nl;
ssize_t len, nl;
int entry_cnt = 0, multiline = 0;
int form_D = 0;/* The archive is generated by `NetBSD mtree -D'
* (In this source we call it `form D') . */
Expand Down Expand Up @@ -728,8 +728,6 @@ detect_form(struct archive_read *a, int *is_form_d)
* character of previous line was '\' character. */
if (bid_keyword_list(p, len, 0, 0) <= 0)
break;
if (multiline == 1)
detected_bytes += len;
if (p[len-nl-1] != '\\') {
if (multiline == 1 &&
++entry_cnt >= MAX_BID_ENTRY)
Expand All @@ -745,7 +743,6 @@ detect_form(struct archive_read *a, int *is_form_d)

keywords = bid_entry(p, len, nl, &last_is_path);
if (keywords >= 0) {
detected_bytes += len;
if (form_D == 0) {
if (last_is_path)
form_D = 1;
Expand Down

0 comments on commit a4c3c90

Please sign in to comment.