NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59777: Incorrect warning message in Unix compress
>Number: 59777
>Category: bin
>Synopsis: Incorrect warning message in Unix compress
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 20 01:00:00 +0000 2025
>Originator: Chris Spiegel
>Release: 10.1
>Organization:
>Environment:
N/A (found while reading code)
>Description:
There are a few absolutely minor issues I found in the "compress" program.
This is all in src/usr.bin/compress/compress.c.
1. When the program is called as "zcat" it sets itself to "cat" mode (lines 87-89). But then on line 93, the cat variable is unconditionally reset to 0, meaning the "zcat" program behaves exactly as "uncompress". This is irrelevant unless somebody links "compress" to "zcat" themselves since the "zcat" symlink was removed in 1993, but perhaps either the "zcat" check should be removed, or the variables should be initialized earlier, to avoid confusion for the many people interested in the source to Unix compress.
2. The following occurs on lines 409-410:
if (chmod(name, fs->st_mode))
cwarn("chown: %s", name);
The warning message should say "chmod" instead of "chown". I'm not sure if it's even possible to see this since odds are if you created the file you'll have the rights to chmod it, but you never know...
3. Line 269 is not indented properly (should be indented two more tabs).
>How-To-Repeat:
N/A
>Fix:
N/A (described above)
Home |
Main Index |
Thread Index |
Old Index