summaryrefslogtreecommitdiff
path: root/src/Cursor.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-19 10:36:54 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-19 10:36:54 -0800
commit82662a3129c59d5950b52ff4daf2e47c7a87327b (patch)
treeca2c0c2639e4c57fcf4fd118a350ec0d381b50c4 /src/Cursor.c
parente56e1003ab225d383cda67eb61737bc14e92332c (diff)
Variable scope reduction as recommended by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Cursor.c')
-rw-r--r--src/Cursor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Cursor.c b/src/Cursor.c
index 4742240..5faf681 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -77,7 +77,7 @@ XFixesGetCursorImage (Display *dpy)
xXFixesGetCursorImageAndNameReply rep;
size_t npixels;
size_t nbytes_name;
- size_t nbytes, nread, rlength;
+ size_t nbytes, nread;
XFixesCursorImage *image;
char *name;
@@ -105,6 +105,8 @@ XFixesGetCursorImage (Display *dpy)
if ((rep.length < (INT_MAX >> 2)) &&
npixels < (((INT_MAX >> 3) - sizeof (XFixesCursorImage) - 1)
- nbytes_name)) {
+ size_t rlength;
+
/* reply data length */
nbytes = (size_t) rep.length << 2;
/* bytes of actual data in the reply */