Mailing List Archive

[master] 04e9659f2 Change vsm->serial to uint64_t.
commit 04e9659f21c4a6507bf952ea53bfe2369ef9be88
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Tue Dec 6 13:19:50 2022 +0000

Change vsm->serial to uint64_t.

Neither Martin nor I can remember why this was uintptr_t in the first
place, and there is no signs of pointers anywhere nearby.

diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index af1b3b212..42d4b9337 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -74,13 +74,13 @@ const struct vsm_valid VSM_valid[1] = {{"valid"}};
static vlu_f vsm_vlu_func;

#define VSM_PRIV_SHIFT \
- (sizeof (uintptr_t) * 4)
+ (sizeof (uint64_t) * 4)
#define VSM_PRIV_MASK \
((1UL << VSM_PRIV_SHIFT) - 1)
#define VSM_PRIV_LOW(u) \
- ((uintptr_t)(u) & VSM_PRIV_MASK)
+ ((uint64_t)(u) & VSM_PRIV_MASK)
#define VSM_PRIV_HIGH(u) \
- (((uintptr_t)(u) >> VSM_PRIV_SHIFT) & VSM_PRIV_MASK)
+ (((uint64_t)(u) >> VSM_PRIV_SHIFT) & VSM_PRIV_MASK)
#define VSM_PRIV_MERGE(low, high) \
(VSM_PRIV_LOW(low) | (VSM_PRIV_LOW(high) << VSM_PRIV_SHIFT))

@@ -105,7 +105,7 @@ struct vsm_seg {
size_t sz;
void *b;
void *e;
- uintptr_t serial;
+ uint64_t serial;
};

struct vsm_set {
@@ -140,7 +140,7 @@ struct vsm {
#define VSM_MAGIC 0x6e3bd69b

struct vsb *diag;
- uintptr_t serial;
+ uint64_t serial;

int wdfd;
struct stat wdst;
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit