[lxc-devel] [PATCH] Don't call sig_name twice, use pointer instead

Alexander Vladimirov alexander.idkfa.vladimirov at gmail.com
Fri Jun 27 17:32:30 UTC 2014


Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov at gmail.com>
---
 src/lxc/confile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 855b816..69d1bb6 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -2342,7 +2342,7 @@ void write_config(FILE *fout, struct lxc_conf *c)
 		if (signame == NULL) {
 			fprintf(fout, "lxc.haltsignal = %d\n", c->haltsignal);
 		} else {
-			fprintf(fout, "lxc.haltsignal = SIG%s\n", sig_name(c->haltsignal));
+			fprintf(fout, "lxc.haltsignal = SIG%s\n", signame);
 		}
 	}
 	if (c->stopsignal) {
@@ -2350,7 +2350,7 @@ void write_config(FILE *fout, struct lxc_conf *c)
 		if (signame == NULL) {
 			fprintf(fout, "lxc.stopsignal = %d\n", c->stopsignal);
 		} else {
-			fprintf(fout, "lxc.stopsignal = SIG%s\n", sig_name(c->stopsignal));
+			fprintf(fout, "lxc.stopsignal = SIG%s\n", signame);
 		}
 	}
 	#if HAVE_SYS_PERSONALITY_H
-- 
2.0.1



More information about the lxc-devel mailing list