summaryrefslogtreecommitdiff
path: root/xdriinfo.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-08 14:45:02 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-08 14:50:46 -0800
commita318124b38bbfac36f6bfe537839b0d3a9065b94 (patch)
treecbecd2b933760782a68f765a346d0ef480c7cc7e /xdriinfo.c
parent710f7c9e9fad765bfe4c31071a82460c473abee7 (diff)
Variable scope reduction
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xdriinfo.c')
-rw-r--r--xdriinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xdriinfo.c b/xdriinfo.c
index c7e7482..1bca9c4 100644
--- a/xdriinfo.c
+++ b/xdriinfo.c
@@ -58,7 +58,7 @@ void printUsage (void) {
int main (int argc, char *argv[]) {
Display *dpy;
- int nScreens, screenNum, i;
+ int nScreens, screenNum;
enum INFO_FUNC func = LIST;
char *funcArg = NULL;
char *dpyName = NULL;
@@ -71,7 +71,7 @@ int main (int argc, char *argv[]) {
}
/* parse the command line */
- for (i = 1; i < argc; ++i) {
+ for (int i = 1; i < argc; ++i) {
char **argPtr = NULL;
if (!strcmp (argv[i], "-display"))
argPtr = &dpyName;
@@ -179,7 +179,7 @@ int main (int argc, char *argv[]) {
break;
}
case LIST:
- for (i = 0; i < nScreens; ++i) {
+ for (int i = 0; i < nScreens; ++i) {
const char *name = (*GetScreenDriver) (dpy, i);
if (name)
printf ("Screen %d: %s\n", i, name);