HomeFreeBSD

getopt() returns `int' according to the standard, but was assigned to `char'

Description

getopt() returns int' according to the standard, but was assigned to char'
variable, and this can break the == -1 check. It works on i386, but not on
PowerPC, where `char' is unsigned by default.

Use variable of correct type (int) to hold the return value of getopt(3).

Details

Provenance
danfeAuthored on
Parents
rP396374: Update to v5.23.2-208-g7ce1b4c.
Branches
Unknown
Tags
Unknown