opnsense-ports/textproc/senna/files/patch-store.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

24 lines
594 B
C

--- ./lib/store.c.orig 2008-06-12 14:18:12.000000000 +0900
+++ ./lib/store.c 2008-11-13 18:21:14.000000000 +0900
@@ -20,6 +20,7 @@
#include "sym.h"
#include "store.h"
#include "ctx.h"
+#include <stddef.h>
#include <string.h>
/* rectangular arrays */
@@ -1735,10 +1736,12 @@
sen_vgram_buf_add(sen_vgram_buf *b, sen_id tid)
{
uint8_t dummybuf[8], *dummyp;
+ ptrdiff_t pd;
if (b->tvp < b->tve) { *b->tvp++ = tid; }
dummyp = dummybuf;
SEN_B_ENC(tid, dummyp);
- simple_sum += dummyp - dummybuf;
+ pd = dummyp - dummybuf;
+ simple_sum += (int)pd;
return sen_success;
}