summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-16 19:13:03 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-16 19:13:03 -0800
commit98c179ea912e9e420451adeb9bab4b462cab836c (patch)
treee97a3a8a7e85b40ed161731d2cbca1359c47ec82
parent51cbd370a2fc0d671398d7572c29f00cae34a86f (diff)
downloadxorg-lib-libXdamage-98c179ea912e9e420451adeb9bab4b462cab836c.tar.gz
Variable scope reduction as recommended by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/Xdamage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Xdamage.c b/src/Xdamage.c
index 9bec8df..fe184f5 100644
--- a/src/Xdamage.c
+++ b/src/Xdamage.c
@@ -49,7 +49,6 @@ XDamageExtAddDisplay (XDamageExtInfo *extinfo,
const char *ext_name)
{
XDamageExtDisplayInfo *info;
- int ev;
info = (XDamageExtDisplayInfo *) Xmalloc (sizeof (XDamageExtDisplayInfo));
if (!info) return NULL;
@@ -66,7 +65,7 @@ XDamageExtAddDisplay (XDamageExtInfo *extinfo,
xDamageQueryVersionReq *req;
XESetCloseDisplay (dpy, info->codes->extension,
XDamageCloseDisplay);
- for (ev = info->codes->first_event;
+ for (int ev = info->codes->first_event;
ev < info->codes->first_event + XDamageNumberEvents;
ev++)
{