aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}