]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
criu: silence static analysis
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 4 Dec 2017 00:48:46 +0000 (01:48 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 17 Dec 2017 14:50:18 +0000 (15:50 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/criu.c

index 6093a31338356e2f1fc8e12378f285756c8dd476..b4b37e5ac8580b8e8757fe81535f5cd0dead78b3 100644 (file)
@@ -1025,7 +1025,12 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
                 * assign the return here to silence potential.
                 */
                ret = snprintf(title, sizeof(title), "[lxc monitor] %s %s", c->config_path, c->name);
+               if (ret < 0 || (size_t)ret >= sizeof(title))
+                       INFO("Setting truncated process name");
+
                ret = setproctitle(title);
+               if (ret < 0)
+                       INFO("Failed to set process name");
 
                ret = lxc_poll(c->name, handler);
                if (ret)