]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
commands_utils: fix integer comparisons
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 10:57:07 +0000 (12:57 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 11:01:43 +0000 (13:01 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/commands_utils.c

index 6a62d2fcb8a6aa6ffb89311db8a4d0cefa582c6d..8f77880e6e29c5667d74296f935da7fbed436767 100644 (file)
@@ -130,7 +130,7 @@ int lxc_make_abstract_socket_name(char *path, size_t pathlen,
         * ret >= len. This means lxcpath and name are too long. We need to
         * hash both.
         */
-       if (ret >= len) {
+       if ((size_t)ret >= len) {
                tmplen = strlen(name) + strlen(lxcpath) + 2;
                tmppath = must_realloc(NULL, tmplen);
                ret = strnprintf(tmppath, tmplen, "%s/%s", lxcpath, name);