summaryrefslogtreecommitdiff
path: root/src/AddTrap.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-28 11:52:49 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-07 17:59:53 +0000
commit2b927f88ad3d97e5fd1abd13b67724a86dd10404 (patch)
tree5664010c4062ba7bd0cfde81904f46724e62cdc1 /src/AddTrap.c
parent229c65d2dd6de511a005127245dc28d426ad6860 (diff)
downloadxorg-lib-libXrender-2b927f88ad3d97e5fd1abd13b67724a86dd10404.tar.gz
Resolve -Wsign-compare warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/AddTrap.c')
-rw-r--r--src/AddTrap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AddTrap.c b/src/AddTrap.c
index 7e2021e..ccbada0 100644
--- a/src/AddTrap.c
+++ b/src/AddTrap.c
@@ -44,7 +44,7 @@ XRenderAddTraps (Display *dpy,
{
xRenderAddTrapsReq *req;
int n;
- long len;
+ unsigned long len;
GetReq(RenderAddTraps, req);
req->reqType = info->codes->major_opcode;
@@ -53,10 +53,10 @@ XRenderAddTraps (Display *dpy,
req->xOff = xOff;
req->yOff = yOff;
n = ntrap;
- len = ((long) n) * (SIZEOF (xTrap) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrap) >> 2);
- len = ((long)n) * (SIZEOF (xTrap) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;