X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=cdb%2Fwriteable.c;h=3ad0c1e5499ab01cc994e7d54dbf352299823595;hb=62f8f2f13b024b49dfbed2b2839ec510ad37eb85;hp=6b072ffdba7042398965758dc6ad386b18c15a5b;hpb=6fd9d63aabc27f4bffc59fcb84e19792cfed6294;p=chiark-tcl.git diff --git a/cdb/writeable.c b/cdb/writeable.c index 6b072ff..3ad0c1e 100644 --- a/cdb/writeable.c +++ b/cdb/writeable.c @@ -75,7 +75,7 @@ typedef struct HashValue { static HashValue *htv_prep(int len) { HashValue *hd; - hd= TALLOC((hd->data - (Byte*)hd) + len); + hd= TALLOC(offsetof(typeof(*hd), data) + len); hd->len= len; return hd; }