From 2f13e3d23d9acd448b1e1e2cad419b4c118c43e4 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Wed, 25 Apr 2018 21:53:27 +0200 Subject: checksrc: force indentation of lines after an else This extends the INDENTATION case to also handle 'else' statements and require proper indentation on the following line. Also fixes the offending cases found in the codebase. Closes #2532 --- src/tool_operate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/tool_operate.c b/src/tool_operate.c index 932dda6e0..626c30888 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -456,8 +456,7 @@ static CURLcode operate_do(struct GlobalConfig *global, the number of resources as urlnum. */ urlnum = count_next_metalink_resource(mlfile); } - else - if(!config->globoff) { + else if(!config->globoff) { /* Unless explicitly shut off, we expand '{...}' and '[...]' expressions and return total number of URLs in pattern set */ result = glob_url(&urls, urlnode->url, &urlnum, @@ -1858,8 +1857,7 @@ static CURLcode operate_do(struct GlobalConfig *global, */ break; } - else - if(urlnum > 1) { + else if(urlnum > 1) { /* when url globbing, exit loop upon critical error */ if(is_fatal_error(result)) break; -- cgit v1.2.3