[lxc-devel] [lxc/lxc] 5590a6: Initialize a pointer in split_init_cmd() to avoid ...
GitHub
noreply at github.com
Fri Apr 22 21:30:01 UTC 2016
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 5590a671bce804b9f25765fdb1fc9cfcdae2c801
https://github.com/lxc/lxc/commit/5590a671bce804b9f25765fdb1fc9cfcdae2c801
Author: Leonid Isaev <leonid.isaev at jila.colorado.edu>
Date: 2016-04-22 (Fri, 22 Apr 2016)
Changed paths:
M src/lxc/lxccontainer.c
Log Message:
-----------
Initialize a pointer in split_init_cmd() to avoid gcc warnings
gcc -Wall warns about uninitialized variables (-Wmaybe-uninitialized), and
-Werror makes it fatal. This change allows the build to succeed by NULL'ifying
the pointer passed to strtok_r().
Note that strtok_r(3) anyway ignores a non-NULL arg3 pointer on the 1st call
with non-NULL arg1 string.
Signed-off-by: Leonid Isaev <leonid.isaev at jila.colorado.edu>
Acked-by: Serge Hallyn <serge.hallyn at ubuntu.com>
More information about the lxc-devel
mailing list