]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
scout.c: only declare width once
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 26 May 2010 21:50:43 +0000 (17:50 -0400)
committerRuss Allbery <rra@stanford.edu>
Thu, 27 May 2010 02:58:25 +0000 (19:58 -0700)
The width variable was declared twice, for the whole function
and also within the for loop, leaving the first one unused
and triggering a warning and a failed build with enable-checking.

Change-Id: Idd061aa0e9eff1f158bfdbd67a20fe5876570089
Reviewed-on: http://gerrit.openafs.org/2039
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
src/scout/scout.c

index ccfe82b18c1d80f2fcf96906851ea944b200ab31..b17a857e0febc6d7f9a19c2dbff77d26c0d1fea3 100644 (file)
@@ -2203,7 +2203,7 @@ scout_SetColumnWidths(struct cmd_item *a_width_item)
     int num_cols = sizeof(scout_col_width) / sizeof(*scout_col_width);
 
     for (i = 0; a_width_item && i < num_cols; i++) {
-       int width = atoi(a_width_item->data);
+       width = atoi(a_width_item->data);
        if (width > 0) {
            int min_width = strlen(scout_underline[i]);
            if (min_width) {