summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xstdcmap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/xstdcmap.c b/xstdcmap.c
index 99fcf4b..3d9a0f7 100644
--- a/xstdcmap.c
+++ b/xstdcmap.c
@@ -148,8 +148,7 @@ parse(int argc, char **argv)
snprintf(option, sizeof(option), "%s%s", program_name, ".delete");
if (XrmGetResource(database, option, (char *) NULL, &type, &value)) {
- unsigned int i;
- for (i=0; i < NPROPERTIES; i++) {
+ for (unsigned int i = 0; i < NPROPERTIES; i++) {
if (strcmp((char *) value.addr, propertyTable[i].nickname) == 0) {
propertyTable[i].delete++;
break;
@@ -212,16 +211,16 @@ getDeepestVisual(int visual_class, /* specifies the desired visual class */
XVisualInfo *vinfo, /* specifies all visuals for a screen */
int nvisuals) /* specifies number of visuals in the list */
{
- register int i;
int maxdepth = 0;
XVisualInfo *v = NULL;
- for (i=0; i < nvisuals; i++, vinfo++)
+ for (int i = 0; i < nvisuals; i++, vinfo++) {
if (vinfo->class == visual_class && vinfo->depth > maxdepth)
{
maxdepth = vinfo->depth;
v = vinfo;
}
+ }
return(v);
}
@@ -276,7 +275,6 @@ visualStringFromClass(int class)
static int
doIndividualColormaps(void)
{
- unsigned int i;
int screen, nvisuals;
Status status = -1;
XVisualInfo *vinfo = NULL, *v = NULL, template;
@@ -286,7 +284,7 @@ doIndividualColormaps(void)
vinfo = XGetVisualInfo(dpy, VisualScreenMask, &template, &nvisuals);
/* check for individual standard colormap requests */
- for (i=0; i < NPROPERTIES; i++) {
+ for (unsigned int i = 0; i < NPROPERTIES; i++) {
if (propertyTable[i].delete) {
XmuDeleteStandardColormap(dpy, screen, propertyTable[i].property);