patch to add getopt parsing to expr

Joerg Sonnenberger joerg at britannica.bec.de
Tue Jan 20 05:05:16 PST 2009


On Mon, Jan 19, 2009 at 11:30:55PM -0500, Joe Talbott wrote:
> +	while ((ch = getopt(argc, argv, "-")) != -1) {

The use of getopt here is wrong. Besides, using getopt is taking a
sledgehammer to crack a nut. Attached is the corresponding fix for
NetBSD, the explicit check for having at least one argument is better
anyway.

Joerg





More information about the Bugs mailing list