gui: linux: fix inccorrect sizeof()
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 7 Nov 2012 16:10:25 +0000 (17:10 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 7 Nov 2012 16:21:12 +0000 (17:21 +0100)
Coverity:
CID 742357 (#1 of 1): Incorrect sizeof expression (BAD_SIZEOF)
Taking the size of arithmetic expression "512 + 1" is suspicious.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
gui/linux-gtk/src/ipc.c

index 371ed9f..9400fe1 100644 (file)
@@ -117,7 +117,7 @@ ipc_read(void)
   //char buf[BUFFSIZE+1];
 
   //printf(".");fflush(stdout);
-  memset(&inbuf, 0, sizeof(BUFFSIZE + 1));
+  memset(&inbuf, 0, sizeof(inbuf));
   //buf[0] = '\0';
 
   if (connected) {