From 960bbfef59d2220d411b0884cfcd800b7a948e58 Mon Sep 17 00:00:00 2001 From: Marius Messerschmidt Date: Fri, 17 Nov 2023 22:18:19 +0100 Subject: [PATCH] ClangTidy: fix misplaced cast --- src/detection/displayserver/linux/xcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/displayserver/linux/xcb.c b/src/detection/displayserver/linux/xcb.c index 4a5240837..fde41abd3 100644 --- a/src/detection/displayserver/linux/xcb.c +++ b/src/detection/displayserver/linux/xcb.c @@ -60,7 +60,7 @@ static void* xcbGetProperty(XcbPropertyData* data, xcb_connection_t* connection, } //Why are xcb property strings not null terminated??? - void* replyValue = malloc((size_t) (length + 1)); + void* replyValue = malloc((size_t)length + 1); memcpy(replyValue, data->ffxcb_get_property_value(propertyReply), (size_t) length); ((char*) replyValue)[length] = '\0';