[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: Ray Lai <ray_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Sat, 11 Mar 2006 00:04:53 -0700 (MST)
CVSROOT: /cvs
Module name: src
Changes by: ray_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org 2006/03/11 00:04:53
Modified files:
usr.bin/vi/common: options.c
Log message:
Fixes the `optindx' might be used uninitialized in this function
warning, fixes a spacing nit in a macro, and cleans up a very bad
preprocessor abuse (``if LF_ISSET(OS_DEF)''!)
optindx turns out to be the index number of the gigantic option
list at the beginning of the file. All we need to do is set it
before every ``goto err''.
The first four are global options, which you can just set optindx
to the second argument of o_set().
The last one is in a loop that uses cnt as the index. Since that
is cnt's only use, I just removed cnt and used optindx instead.
optindx is always updated and we use one less variable.
ok miod, otto
Visit your host, monkey.org