commands_utils: fix integer comparisons

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-09-03 12:57:07 +02:00
parent 5e0e7af42a
commit 60a8b99b89
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View 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 * ret >= len. This means lxcpath and name are too long. We need to
* hash both. * hash both.
*/ */
if (ret >= len) { if ((size_t)ret >= len) {
tmplen = strlen(name) + strlen(lxcpath) + 2; tmplen = strlen(name) + strlen(lxcpath) + 2;
tmppath = must_realloc(NULL, tmplen); tmppath = must_realloc(NULL, tmplen);
ret = strnprintf(tmppath, tmplen, "%s/%s", lxcpath, name); ret = strnprintf(tmppath, tmplen, "%s/%s", lxcpath, name);