]> 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>
Mon, 4 Dec 2017 00:48:46 +0000 (01:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/criu.c

index 3285176dff4c92f3d2ebeca1f72b7617d08c31ff..8b3a213d89bd8daec019481598b173971de3ac08 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)