diff options
author | Adam Spragg <adam@spra.gg> | 2023-01-12 14:19:23 +0000 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2023-01-12 14:19:23 +0000 |
commit | cd3b34aa2d31f2cdfcf6951cbd108fb0f5fa8732 (patch) | |
tree | 28132381339a789ff19787df775a445f1ae193e7 | |
parent | 5073c9d007896eb822e21d49745459be22606ccc (diff) |
Puzzle 22: Remove unneeded variable
Process command-line options by re-using a different variable than the
one we were re-using before.
-rw-r--r-- | 22.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -230,13 +230,12 @@ main(int argc, char ** argv) struct map map; enum map_type mtype = M_FLAT; long bufsiz = 0, buflen = 0; - long pos; struct elf elf; char distance[8]; int c, dlen = 0; - while ((pos = getopt(argc, argv, "p:m:")) != -1) { - switch (pos) { + while ((c = getopt(argc, argv, "p:m:")) != -1) { + switch (c) { case 'p': switch (atoi(optarg)) { case 1: |