From 0f8a8423c94cf0edba1e077a3b0e90f2b0b99edc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 20 Mar 2024 23:32:24 +0100 Subject: [PATCH] ipc: Remove pointless initialization in shm_get_shmmax(). The subsequent read() call overwrites the buffer. --- ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc.c b/ipc.c index 8e9dd51a..c245f690 100644 --- a/ipc.c +++ b/ipc.c @@ -218,7 +218,7 @@ size_t shm_get_shmmax(void) { int fd = open("/proc/sys/kernel/shmmax", O_RDONLY); if (fd >= 0) { - char buf[100] = ""; + char buf[100]; int ret = read(fd, buf, sizeof(buf) - 1); if (ret > 0) { buf[ret] = '\0'; -- 2.39.5