From: Tom Hromatka Date: Tue, 29 Jul 2025 16:01:54 +0000 (+0000) Subject: api: Fix clang warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=882afcab7de5e2f6edff8069774d36c0edbe2212;p=thirdparty%2Flibcgroup.git api: Fix clang warning Fix the following warning by simply deleting the line. The variable path_dir_end is not used after this line, and thus does not need to be set. api.c:2384:19: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion] 2384 | path_dir_end = '\0'; Signed-off-by: Tom Hromatka Signed-off-by: Kamalesh Babulal --- diff --git a/src/api.c b/src/api.c index 2b539acd..0a9f847a 100644 --- a/src/api.c +++ b/src/api.c @@ -2381,7 +2381,6 @@ static int cg_set_control_value(char *path, const char *val) path_dir_end = strrchr(path, '/'); if (path_dir_end == NULL) return ECGROUPVALUENOTEXIST; - path_dir_end = '\0'; /* task_path contain: $path/tasks */ tasks_path = (char *)malloc(strlen(path) + 6 + 1);