Skip to content

Commit

Permalink
dumpon: fix set but not used variable
Browse files Browse the repository at this point in the history
Signed-off-by: inkeliz <[email protected]>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	freebsd#1178
  • Loading branch information
inkeliz authored and markjdb committed Apr 18, 2024
1 parent f7f570e commit 464b1ab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sbin/dumpon/dumpon.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,20 +463,23 @@ main(int argc, char *argv[])
struct diocskerneldump_arg ndconf, *kdap;
struct addrinfo hints, *res;
const char *dev, *pubkeyfile, *server, *client, *gateway;
int ch, error, fd, cipher;
int ch, error, fd;
bool gzip, list, netdump, zstd, insert, rflag;
uint8_t ins_idx;
#ifdef HAVE_CRYPTO
int cipher = KERNELDUMP_ENC_NONE;
#endif

gzip = list = netdump = zstd = insert = rflag = false;
kdap = NULL;
pubkeyfile = NULL;
server = client = gateway = NULL;
ins_idx = KDA_APPEND;
cipher = KERNELDUMP_ENC_NONE;

while ((ch = getopt(argc, argv, "C:c:g:i:k:lrs:vZz")) != -1)
switch ((char)ch) {
case 'C':
#ifdef HAVE_CRYPTO
if (strcasecmp(optarg, "chacha") == 0 ||
strcasecmp(optarg, "chacha20") == 0)
cipher = KERNELDUMP_ENC_CHACHA20;
Expand All @@ -487,6 +490,11 @@ main(int argc, char *argv[])
errx(EX_USAGE, "Unrecognized cipher algorithm "
"'%s'", optarg);
break;
#else
errx(EX_USAGE,
"Built without crypto support, -C is unhandled.");
break;
#endif
case 'c':
client = optarg;
break;
Expand Down

0 comments on commit 464b1ab

Please sign in to comment.