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

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jun 27 18:18:56 UTC 2014


Quoting Alexander Vladimirov (alexander.idkfa.vladimirov at gmail.com):
> Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov at gmail.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.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
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list