[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 3/3] ls: match len's type with calc_name_len() result type
From: Guilherme Maciel Ferreira <guilherme.maciel.ferreira () gmail ! com>
Date: 2014-07-26 17:37:05
Message-ID: 1406396225-3248-3-git-send-email-guilherme.maciel.ferreira () gmail ! com
[Download RAW message or body]
The variable len compares with 'column_width' and is assigned the
calc_name_len()'s result, both unsigned integers. Thus, the len variable
should be unsigned too.
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
---
coreutils/ls.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 1b63be5..c173c6b 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -661,7 +661,7 @@ static void display_files(struct dnode **dn, unsigned nfiles)
} else {
/* find the longest file name, use that as the column width */
for (i = 0; dn[i]; i++) {
- int len = calc_name_len(dn[i]->name);
+ unsigned len = calc_name_len(dn[i]->name);
if (column_width < len)
column_width = len;
}
--
1.7.0.4
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic