From 147c70650fb89f76d28b60fd5cb41cbcc468f831 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 25 Feb 2002 22:28:07 +0000 Subject: Merge of xfs-cmds-2.4.18:slinx:111470a by nathans. remove off-by-one noop loop in listing attributes. --- getfattr/getfattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'getfattr/getfattr.c') diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c index 45e9161..4932a64 100644 --- a/getfattr/getfattr.c +++ b/getfattr/getfattr.c @@ -237,7 +237,7 @@ int do_get_all(const char *path, struct stat *stat, void *dummy) return 1; } - for (v = list; v - list <= listsize; v += strlen(v)+1) + for (v = list; (v - list) < listsize; v += strlen(v)+1) if (regexec(&re, v, (size_t) 0, NULL, 0) == 0) count++; if (count) { @@ -245,7 +245,7 @@ int do_get_all(const char *path, struct stat *stat, void *dummy) if (high_water_alloc((void **)&names, &ncount, n)) return 1; n = 0; - for (v = list; v - list <= listsize; v += strlen(v)+1) + for (v = list; (v - list) < listsize; v += strlen(v)+1) if (regexec(&re, v, (size_t) 0, NULL, 0) == 0) names[n++] = v; qsort(names, count, sizeof(char *), -- cgit v1.2.3