]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: drop trailing newline from various log calls 28343/head
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Jul 2023 12:54:11 +0000 (14:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Jul 2023 14:40:30 +0000 (16:40 +0200)
We generate this implicitly, hence we generally don't include it
explicitly.

src/sulogin-shell/sulogin-shell.c
src/test/test-cgroup-mask.c
src/test/test-daemon.c
src/test/test-id128.c
src/test/test-json.c
src/test/test-load-fragment.c
src/test/test-process-util.c

index 068ab3f4a0e96bdc154013c193e30678ae2da546..7ffafcda553e66f1616b9bb5304b883a0d233baa 100644 (file)
@@ -140,7 +140,7 @@ static int run(int argc, char *argv[]) {
                 if (r < 0)
                         goto fallback;
                 if (!r) {
-                        log_warning("%s is not inactive. Please review the %s setting.\n", target, target);
+                        log_warning("%s is not inactive. Please review the %s setting.", target, target);
                         goto fallback;
                 }
 
@@ -148,7 +148,7 @@ static int run(int argc, char *argv[]) {
                         break;
 
         fallback:
-                log_warning("Fallback to the single-user shell.\n");
+                log_warning("Fallback to the single-user shell.");
         }
 
         return 0;
index b26a834530dc85a4fc88080050be0b6848fdda24..c0bf5859635329ee98024edd4b37ba0a3508f8bd 100644 (file)
@@ -21,9 +21,9 @@ static void log_cgroup_mask(CGroupMask got, CGroupMask expected) {
         _cleanup_free_ char *e_store = NULL, *g_store = NULL;
 
         assert_se(cg_mask_to_string(expected, &e_store) >= 0);
-        log_info("Expected mask: %s\n", e_store);
+        log_info("Expected mask: %s", e_store);
         assert_se(cg_mask_to_string(got, &g_store) >= 0);
-        log_info("Got mask: %s\n", g_store);
+        log_info("Got mask: %s", g_store);
 }
 
 TEST_RET(cgroup_mask, .sd_booted = true) {
index faf64767785b4956379143d813f57d28f961e9c2..e5bc6c457b70f6c3e10f9d70c21ad607d21d48f0 100644 (file)
@@ -27,7 +27,7 @@ int main(int argc, char *argv[]) {
         }
 
         for (i = 0; i < n; i++)
-                log_info("fd=%i name=%s\n", SD_LISTEN_FDS_START + i, l[i]);
+                log_info("fd=%i name=%s", SD_LISTEN_FDS_START + i, l[i]);
 
         sd_notify(0,
                   "STATUS=Starting up");
index 4a39d06ef88a73501b7149598be20e58eab9e5a9..58dc88110e7b1f9c601182f9a8c29ec1c41b00a8 100644 (file)
@@ -214,7 +214,7 @@ TEST(benchmark_sd_id128_get_machine_app_specific) {
 
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info("%lf μs each\n", (double) q / iterations);
+        log_info("%lf μs each", (double) q / iterations);
 }
 
 TEST(id128_at) {
index 6a544c3fb7ba9ea23bb17f74f4158de9b4013148..3657075a544dead3a6f851448e0dc12e1033fd7a 100644 (file)
@@ -95,7 +95,7 @@ static void test_variant_one(const char *data, Test test) {
         assert_se(s);
         assert_se((size_t) r == strlen(s));
 
-        log_info("formatted normally: %s\n", s);
+        log_info("formatted normally: %s", s);
 
         r = json_parse(data, JSON_PARSE_SENSITIVE, &w, NULL, NULL);
         assert_se(r == 0);
@@ -305,7 +305,7 @@ TEST(build) {
                                                   JSON_BUILD_STRV((char**) arr_1234))) >= 0);
 
         assert_se(json_variant_format(a, 0, &s) >= 0);
-        log_info("GOT: %s\n", s);
+        log_info("GOT: %s", s);
         assert_se(json_parse(s, 0, &b, NULL, NULL) >= 0);
         assert_se(json_variant_equal(a, b));
 
@@ -316,10 +316,10 @@ TEST(build) {
 
         s = mfree(s);
         assert_se(json_variant_format(a, 0, &s) >= 0);
-        log_info("GOT: %s\n", s);
+        log_info("GOT: %s", s);
         assert_se(json_parse(s, 0, &b, NULL, NULL) >= 0);
         assert_se(json_variant_format(b, 0, &t) >= 0);
-        log_info("GOT: %s\n", t);
+        log_info("GOT: %s", t);
 
         assert_se(streq(s, t));
 
index e4ee9f697d68658239a9b71d582bba40852eb2af..ac0ad80132d090f03d320fd2ccd66237c03218f6 100644 (file)
@@ -923,7 +923,7 @@ TEST(config_parse_memory_limit) {
                 r = config_parse_memory_limit(NULL, "fake", 1, "section", 1,
                                               limit_tests[i].limit, 1,
                                               limit_tests[i].value, &c, NULL);
-                log_info("%s=%s\t%"PRIu64"==%"PRIu64"\n",
+                log_info("%s=%s\t%"PRIu64"==%"PRIu64,
                          limit_tests[i].limit, limit_tests[i].value,
                          *limit_tests[i].result, limit_tests[i].expected);
                 assert_se(r >= 0);
index 80ee0957868f940d78b3ae9358f23e3fb24e5dad..1aba4d7ae3fd8a3d71083f349ac5d3c6a81f5a3e 100644 (file)
@@ -614,7 +614,7 @@ TEST(getpid_measure) {
                 (void) getpid();
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info(" glibc getpid(): %lf μs each\n", (double) q / iterations);
+        log_info(" glibc getpid(): %lf μs each", (double) q / iterations);
 
         iterations *= 50; /* _cached() is about 50 times faster, so we need more iterations */
 
@@ -623,7 +623,7 @@ TEST(getpid_measure) {
                 (void) getpid_cached();
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info("getpid_cached(): %lf μs each\n", (double) q / iterations);
+        log_info("getpid_cached(): %lf μs each", (double) q / iterations);
 }
 
 TEST(safe_fork) {