nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1e2e6733df261f2b64349d0287e7481f0c518e3a
parent 2669d3623d4b201e163d0f48a41f1bdafba13452
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 21 May 2019 17:25:45 +0200

tweaks: add a pair of braces, to silence a compiler warning

Also, put an 'else' on the same line as the preceding closing brace.

Diffstat:
Msrc/rcfile.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -1088,18 +1088,17 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only) live_syntax->name); parse_syntax(ptr, headers_only); } - } - else if (strcasecmp(keyword, "header") == 0) { + } else if (strcasecmp(keyword, "header") == 0) { if (headers_only || !syntax_only) grab_and_store("header", ptr, &live_syntax->headers); - } else if (strcasecmp(keyword, "magic") == 0) + } else if (strcasecmp(keyword, "magic") == 0) { #ifdef HAVE_LIBMAGIC if (headers_only || !syntax_only) grab_and_store("magic", ptr, &live_syntax->magics); #else ; #endif - else if (headers_only) + } else if (headers_only) break; else if (parse_syntax_commands(keyword, ptr)) ;