]> git.wh0rd.org Git - nano.git/commitdiff
- rcfile.c:parse_rcfile() - Don't use i for both for loop and atoi(), fixes lots...
authorChris Allegretta <chrisa@asty.org>
Thu, 7 Mar 2002 00:46:17 +0000 (00:46 +0000)
committerChris Allegretta <chrisa@asty.org>
Thu, 7 Mar 2002 00:46:17 +0000 (00:46 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
rcfile.c

index 4af142b1491c80bf202d77ccf9f793feaa096da9..4ed94db6a229ffc6b0390fdba24b4baeaff2cd3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@ CVS code -
 - nano.c:
   main()
        - Put NANO_SMALL defines around toggle pointer (noticed by Jordi);
+- rcfile.c:
+  
 - utils.c:
   stristr() - Defined regardless of NANO_SMALL (noticed by Jordi).
          
index 13e0dae80c7b5564f08e02dc568defc8365338dc..9e4459f0edccaef5d684dac0aa0678674ffeda94 100644 (file)
--- a/rcfile.c
+++ b/rcfile.c
@@ -304,7 +304,7 @@ void parse_colors(FILE * rcstream, char *buf, char *ptr)
 void parse_rcfile(FILE * rcstream)
 {
     char *buf, *ptr, *keyword, *option;
-    int set = 0, i;
+    int set = 0, i, j;
 
     buf = charalloc(1024);
     while (fgets(buf, 1023, rcstream) > 0) {
@@ -382,22 +382,22 @@ void parse_rcfile(FILE * rcstream)
                            if (!strcasecmp(rcopts[i].name, "fill")) {
 #ifndef DISABLE_WRAPJUSTIFY
 
-                               if ((i = atoi(option)) < MIN_FILL_LENGTH) {
+                               if ((j = atoi(option)) < MIN_FILL_LENGTH) {
                                    rcfile_error(_
                                                 ("requested fill size %d too small"),
-                                                i);
+                                                j);
                                } else
-                                   fill = i;
+                                   fill = j;
 #endif
                            } else
                                if (!strcasecmp(rcopts[i].name, "tabsize"))
                            {
-                               if ((i = atoi(option)) <= 0) {
+                               if ((j = atoi(option)) <= 0) {
                                    rcfile_error(_
                                                 ("requested tab size %d too small"),
-                                                i);
+                                                j);
                                } else {
-                                   tabsize = i;
+                                   tabsize = j;
                                }
 #ifndef DISABLE_JUSTIFY
                            } else