Skip to content

Commit

Permalink
Remove write-only opt and useless optlen variables.
Browse files Browse the repository at this point in the history
This squashes the warning gebnerated by GCC 6.x. Since
variables that are now removed had come documentation
value, put relevant bits in comment, so they can be
resurrected from there when actually needed.
  • Loading branch information
akabaev committed Dec 24, 2017
1 parent b002fd7 commit 7eba709
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions usr.sbin/efibootmgr/efibootmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,8 @@ print_loadopt_str(uint8_t *data, size_t datalen)
uint8_t *ep = data + datalen;
uint8_t *walker = data;
efidp dp, edp;
void *opt;
char buf[1024];
int len;
int optlen;
int rv;
int indent;

Expand All @@ -734,10 +732,11 @@ print_loadopt_str(uint8_t *data, size_t datalen)
if (walker > ep)
return;
edp = (efidp)walker;
// Everything left is the binary option args
opt = walker;
optlen = ep - walker;

/*
* Everything left is the binary option args
* opt = walker;
* optlen = ep - walker;
*/
indent = 1;
while (dp < edp) {
efidp_format_device_path(buf, sizeof(buf), dp,
Expand All @@ -753,8 +752,6 @@ print_loadopt_str(uint8_t *data, size_t datalen)
}
dp = (efidp)((char *)dp + efidp_size(dp));
}
if (optlen == 0)
return;
}

static char *
Expand Down

0 comments on commit 7eba709

Please sign in to comment.