tree-wide: drop spurious newlines (#8764)

Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.

It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.
This commit is contained in:
Lennart Poettering
2018-04-19 12:13:23 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 6360b8ff83
commit 5d13a15b1d
91 changed files with 40 additions and 121 deletions
-1
View File
@@ -236,7 +236,6 @@ const gather_stdout_callback_t gather_stdout[] = {
gather_stdout_three,
};
static void test_stdout_gathering(void) {
char template[] = "/tmp/test-exec-util.XXXXXXX";
const char *dirs[] = {template, NULL};
-1
View File
@@ -561,7 +561,6 @@ static void test_search_and_fopen(void) {
assert_se(r < 0);
}
static void test_search_and_fopen_nulstr(void) {
const char dirs[] = "/tmp/foo/bar\0/tmp\0";
char name[] = "/tmp/test-search_and_fopen.XXXXXX";
-1
View File
@@ -83,6 +83,5 @@ int main(int argc, char*argv[]) {
}
}
return 0;
}
-1
View File
@@ -394,7 +394,6 @@ int main(int argc, char *argv[]) {
assert_not_reached("Unhandled option code.");
}
/* add sys path if needed */
if (!startswith(syspath, "/sys"))
syspath = strjoina("/sys/", syspath);
-1
View File
@@ -5,7 +5,6 @@
Copyright 2014 Ronny Chevalier
***/
#include "locale-util.h"
#include "macro.h"
#include "strv.h"
-2
View File
@@ -181,7 +181,6 @@ static void test_gethostbyname4_r(void *handle, const char *module, const char *
}
}
static void test_gethostbyname3_r(void *handle, const char *module, const char *name, int af) {
const char *fname;
_nss_gethostbyname3_r_t f;
@@ -401,7 +400,6 @@ static int test_one_module(const char* dir,
char **name;
int i;
log_info("======== %s ========", module);
handle = open_handle(streq(module, "dns") ? NULL : dir,
-1
View File
@@ -662,7 +662,6 @@ static void test_parse_nice(void) {
assert_se(parse_nice("19", &n) >= 0 && n == 19);
assert_se(parse_nice("+19", &n) >= 0 && n == 19);
assert_se(parse_nice("", &n) == -EINVAL);
assert_se(parse_nice("-", &n) == -EINVAL);
assert_se(parse_nice("+", &n) == -EINVAL);
-1
View File
@@ -102,7 +102,6 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
service_state_to_string(service->state),
service_result_to_string(service->result));
/* But we timeout if the service has not been started in the allocated time */
n = now(CLOCK_MONOTONIC);
if (ts + timeout < n) {
-1
View File
@@ -48,7 +48,6 @@ static void test_is_symlink(void) {
assert_se(is_symlink(name_link) == 1);
assert_se(is_symlink("/a/file/which/does/not/exist/i/guess") < 0);
unlink(name);
unlink(name_link);
}
-1
View File
@@ -135,7 +135,6 @@ static void test_strrep(void) {
assert_se(streq(zero, ""));
}
static void test_strappend(void) {
_cleanup_free_ char *t1, *t2, *t3, *t4;
-1
View File
@@ -89,7 +89,6 @@ static const char* const input_table_one_empty[] = {
NULL,
};
static void test_strv_find(void) {
assert_se(strv_find((char **)input_table_multiple, "three"));
assert_se(!strv_find((char **)input_table_multiple, "four"));
-1
View File
@@ -383,7 +383,6 @@ static void test_config_parse_exec(void) {
c1 = c1->command_next;
check_execcommand(c1, "/bin/grep", NULL, "\\w+\\K", NULL, false);
log_info("/* trailing backslash: \\ */");
/* backslash is invalid */
r = config_parse_exec(NULL, "fake", 4, "section", 1,
-1
View File
@@ -412,7 +412,6 @@ static void test_unit_name_escape(void) {
assert_se(streq(r, "ab\\x2b\\x2dc.a-bc\\x40foo.service"));
}
static void test_u_n_t_one(const char *name, const char *expected, int ret) {
_cleanup_free_ char *f = NULL;