aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/client/stat_client.h
diff options
context:
space:
mode:
authorElias Rudberg <elias.rudberg@bahnhof.net>2020-12-01 07:52:48 +0100
committerOle Tr�an <otroan@employees.org>2020-12-02 10:08:53 +0000
commit41f15ae1dfd4ac1777b684fdc763d12496209418 (patch)
treeb531450ed22ecb60affb08546c1fcb0f96f1c7de /src/vpp-api/client/stat_client.h
parentcebed411cc2f5777891f9d7982d0f970c5bd3fbb (diff)
stats: void-pointer arithmetic fix
Cast to (char *) to avoid pointer arithmetic for (void *) pointers. Type: fix Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net> Change-Id: I62607b4cbc553449e2c60d514b4b17dbb4f88216
Diffstat (limited to 'src/vpp-api/client/stat_client.h')
-rw-r--r--src/vpp-api/client/stat_client.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vpp-api/client/stat_client.h b/src/vpp-api/client/stat_client.h
index f8473efd47f..b2457ad6e48 100644
--- a/src/vpp-api/client/stat_client.h
+++ b/src/vpp-api/client/stat_client.h
@@ -103,8 +103,9 @@ stat_segment_adjust (stat_client_main_t * sm, void *data)
{
void *p = (void *) ((char *) sm->shared_header +
((char *) data - (char *) sm->shared_header->base));
- if (p > (void *) sm->shared_header &&
- ((p + sizeof (p)) < ((void *) sm->shared_header + sm->memory_size)))
+ if ((char *) p > (char *) sm->shared_header &&
+ (((char *) p + sizeof (p)) <
+ ((char *) sm->shared_header + sm->memory_size)))
return p;
return 0;
}