show: apply const to right part of pointer
Without this -Wcast-qual complains: show.c:30:43: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual] const struct wgpeer *a = *(const void **)first, *b = *(const void **)second; ^ show.c:30:71: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual] const struct wgpeer *a = *(const void **)first, *b = *(const void **)second; Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
7b2ae7aa2f
commit
ca2e89ff21
|
@ -27,7 +27,7 @@
|
|||
static int peer_cmp(const void *first, const void *second)
|
||||
{
|
||||
time_t diff;
|
||||
const struct wgpeer *a = *(const void **)first, *b = *(const void **)second;
|
||||
const struct wgpeer *a = *(void *const *)first, *b = *(void *const *)second;
|
||||
|
||||
if (!a->last_handshake_time.tv_sec && !a->last_handshake_time.tv_nsec && (b->last_handshake_time.tv_sec || b->last_handshake_time.tv_nsec))
|
||||
return 1;
|
||||
|
|
Reference in New Issue