diff options
| author | Adam Spragg <adam@spra.gg> | 2023-01-12 13:45:17 +0000 | 
|---|---|---|
| committer | Adam Spragg <adam@spra.gg> | 2023-01-12 14:03:20 +0000 | 
| commit | fa82470db34f39f5c1f1df9e4524f727fbb819c2 (patch) | |
| tree | 717cb00a5c7966d6b8165b67fde37b5025b9028a | |
| parent | db6d1da86b80a545e0df38795ee869be57b8b89d (diff) | |
Puzzle 22: Use an `int` to hold the result of fgetc()
A char won't do.
| -rw-r--r-- | 22.c | 4 | 
1 files changed, 2 insertions, 2 deletions
@@ -152,8 +152,8 @@ main(int argc, char ** argv)  	long bufsiz = 0, buflen = 0, maxline = 0, lines = 0;  	long pos;  	struct elf elf; -	char distance[8], c; -	int dlen = 0; +	char distance[8]; +	int c, dlen = 0;  	while ((pos = getopt(argc, argv, "p:m:")) != -1) {  		switch (pos) {  | 
