session/dlmalloc: coverity fixes 95/13795/1
authorFlorin Coras <fcoras@cisco.com>
Sat, 28 Jul 2018 11:53:30 +0000 (04:53 -0700)
committerFlorin Coras <fcoras@cisco.com>
Sat, 28 Jul 2018 11:53:30 +0000 (04:53 -0700)
Change-Id: I17ffec018f5d2fb06a7a3af6d8bc6128ffee3ae6
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/session/application.c
src/vppinfra/dlmalloc.c

index 806e390..99f0dff 100644 (file)
@@ -877,7 +877,7 @@ app_send_io_evt_rx (application_t * app, stream_session_t * s, u8 lock)
 
   if (app_enqueue_evt (mq, &msg, lock))
     return -1;
-  svm_fifo_set_event (s->server_rx_fifo);
+  (void) svm_fifo_set_event (s->server_rx_fifo);
   return 0;
 }
 
index e5bd1e8..8ae92cf 100644 (file)
@@ -1745,6 +1745,7 @@ static int init_mparams(void) {
 #endif
 
     {
+#ifndef DLM_MAGIC_CONSTANT
 #if USE_DEV_RANDOM
       int fd;
       unsigned char buf[sizeof(size_t)];
@@ -1765,7 +1766,7 @@ static int init_mparams(void) {
 #endif
       magic |= (size_t)8U;    /* ensure nonzero */
       magic &= ~(size_t)7U;   /* improve chances of fault for bad values */
-#ifdef DLM_MAGIC_CONSTANT
+#else
       magic = DLM_MAGIC_CONSTANT;
 #endif
       /* Until memory modes commonly available, use volatile-write */