From 882afcab7de5e2f6edff8069774d36c0edbe2212 Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Tue, 29 Jul 2025 16:01:54 +0000 Subject: [PATCH] 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 --- src/api.c | 1 - 1 file changed, 1 deletion(-) 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); -- 2.47.2