Date: Sun, 18 Jul 2004 16:55:41 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Jos? de Paula <espinafre@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] basic modelines for contrib/nvi Message-ID: <20040718135541.GA28115@gothmog.gr> In-Reply-To: <5ef8c2f004071419517bdc9f3e@mail.gmail.com> References: <5ef8c2f004071419517bdc9f3e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-07-14 23:51, Jos? de Paula <espinafre@gmail.com> wrote: > I hacked together this little patch to contrib/nvi to make it support > simple modelines. [snip] > + > + if (O_ISSET(sp, O_MODELINE)) { > + cmd = get_modeline(sp); > + if (cmd != NULL) > + if (ex_run_str(sp, "modeline", cmd, strlen(cmd), 0, 0)) > + return; > + } > + Just a minor comment. Nested if's like the second & third above look like a natural place to use && as in: if (O_ISSET(sp, O_MODELINE)) { cmd = get_modeline(sp); if (cmd != NULL && ex_run_str(sp, "modeline", cmd, strlen(cmd), 0, 0)) return; } Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040718135541.GA28115>