From: Andre Noll Date: Wed, 20 Mar 2024 22:32:24 +0000 (+0100) Subject: ipc: Remove pointless initialization in shm_get_shmmax(). X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=0f8a8423c94cf0edba1e077a3b0e90f2b0b99edc;p=paraslash.git ipc: Remove pointless initialization in shm_get_shmmax(). The subsequent read() call overwrites the buffer. --- 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';