From: Balbir singh Date: Mon, 19 Dec 2022 15:45:15 +0000 (-0700) Subject: Trival: Fix warning in strncmp X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a7ddce616d42fdc83d54ccca738562a9a03240a;p=thirdparty%2Flibcgroup.git Trival: Fix warning in strncmp The name field of the structure is of a much smaller size CONTROL_NAMELEN_MAX and not FILENAME_MAX. Listen to the compiler and fix the issue. Signed-off-by: Balbir singh Reviewed-by: Kamalesh Babulal Signed-off-by: Tom Hromatka (cherry picked from commit ecba55a594001958b253c62ba8d4e9fd5520ea94) --- diff --git a/src/config.c b/src/config.c index de7e3617..155c800d 100644 --- a/src/config.c +++ b/src/config.c @@ -918,7 +918,7 @@ static int config_order_namespace_table(void) for (j = 0; cg_mount_table[j].name[0] != '\0'; j++) { if (strncmp(config_namespace_table[i].name, cg_mount_table[j].name, - FILENAME_MAX) == 0) { + CONTROL_NAMELEN_MAX) == 0) { flag = 1;