[systemd-commits] 3 commits - configure.ac src/shared src/test
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Fri Jul 12 10:24:38 PDT 2013
configure.ac | 2 +-
src/shared/install.c | 7 ++++---
src/test/test-path-util.c | 2 +-
src/test/test-sched-prio.c | 2 ++
src/test/test-unit-name.c | 2 ++
5 files changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 9f64229f9ca69f5652b238a67531432e56108bd6
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Jul 12 13:19:19 2013 -0400
Revert "build-sys: don't enable color gcc on dumb terminals"
This reverts commit cd3069559a09b4e4f85a6f02aa8f0521f48359ca.
Emacs compilation can be fixed by putting
(custom-set-variables
'(compilation-environment (quote ("GCC_COLORS="))))
in ~/.emacs.
diff --git a/configure.ac b/configure.ac
index 802009e..1e196f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,7 +133,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-ffast-math \
-fno-common \
-fdiagnostics-show-option \
- -fdiagnostics-color=auto \
+ -fdiagnostics-color \
-fno-strict-aliasing \
-fvisibility=hidden \
-ffunction-sections \
commit d7b478b448d16b0f755e7e1c2eb4df83859034b2
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Jul 12 08:15:21 2013 -0400
shared/install: fix trivial memleak
We lost the reference when setting path second time.
diff --git a/src/shared/install.c b/src/shared/install.c
index d2dd276..eb9a5fc 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -506,7 +506,7 @@ static int find_symlinks_in_scope(
UnitFileState *state) {
int r;
- _cleanup_free_ char *path = NULL;
+ _cleanup_free_ char *path2 = NULL;
bool same_name_link_runtime = false, same_name_link = false;
assert(scope >= 0);
@@ -514,6 +514,7 @@ static int find_symlinks_in_scope(
assert(name);
if (scope == UNIT_FILE_SYSTEM || scope == UNIT_FILE_GLOBAL) {
+ _cleanup_free_ char *path = NULL;
/* First look in runtime config path */
r = get_config_path(scope, true, root_dir, &path);
@@ -530,11 +531,11 @@ static int find_symlinks_in_scope(
}
/* Then look in the normal config path */
- r = get_config_path(scope, false, root_dir, &path);
+ r = get_config_path(scope, false, root_dir, &path2);
if (r < 0)
return r;
- r = find_symlinks(name, path, &same_name_link);
+ r = find_symlinks(name, path2, &same_name_link);
if (r < 0)
return r;
else if (r > 0) {
commit b463b81399f0bc0d54107ef819cc0f843473c7d7
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Jul 12 08:04:39 2013 -0400
test-path-util,test-sched-prio: uninitialize manager to appease valgrind
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index 127e178..f396b32 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -56,7 +56,7 @@ static void test_path(void) {
assert_se(streq(path_get_file_name("file.../"), ""));
#define test_parent(x, y) { \
- char *z; \
+ char _cleanup_free_ *z = NULL; \
int r = path_get_parent(x, &z); \
printf("expected: %s\n", y ? y : "error"); \
printf("actual: %s\n", r<0 ? "error" : z); \
diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c
index 7af7407..509c75f 100644
--- a/src/test/test-sched-prio.c
+++ b/src/test/test-sched-prio.c
@@ -88,5 +88,7 @@ int main(int argc, char *argv[]) {
assert_se(ser->exec_context.cpu_sched_policy == SCHED_RR);
assert_se(ser->exec_context.cpu_sched_priority == 99);
+ manager_free(m);
+
return EXIT_SUCCESS;
}
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 93bf28a..2fa0294 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -190,6 +190,8 @@ static int test_unit_printf(void) {
expect(u2, "%H", host);
expect(u2, "%t", "/run/user/*");
+ manager_free(m);
+
return 0;
}
More information about the systemd-commits
mailing list