diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-17 17:24:23 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-17 17:24:23 -0700 |
commit | 8710ed270fbb9ec905b906826cb09095c57003f8 (patch) | |
tree | bf5c24943bd7e3251feb084c519836194e456383 /src/XrrScreen.c | |
parent | 684ed1b997f9e8a2fe2219524c1dea04b20a7e25 (diff) | |
download | xorg-lib-libXrandr-8710ed270fbb9ec905b906826cb09095c57003f8.tar.gz |
Variable scope reductions as recommended by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/XrrScreen.c')
-rw-r--r-- | src/XrrScreen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/XrrScreen.c b/src/XrrScreen.c index 1f7ffe6..3773c88 100644 --- a/src/XrrScreen.c +++ b/src/XrrScreen.c @@ -47,7 +47,6 @@ doGetScreenResources (Display *dpy, Window window, int poll) _XRRVersionState async_state; int nbytes, nbytesRead, rbytes; int i; - xRRQueryVersionReq *vreq; XRRScreenResources *xrsr; char *names; char *wire_names, *wire_name; @@ -61,6 +60,8 @@ doGetScreenResources (Display *dpy, Window window, int poll) if (xrri->major_version == -1) { + xRRQueryVersionReq *vreq; + /* hide a version query in the request */ GetReq (RRQueryVersion, vreq); vreq->reqType = info->codes->major_opcode; |