diff options
author | Nathan Scott <nathans@sgi.com> | 2002-02-25 22:28:07 +0000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2002-02-25 22:28:07 +0000 |
commit | 147c70650fb89f76d28b60fd5cb41cbcc468f831 (patch) | |
tree | 2f93dd6f9381813d09245226234b5f28896e716f /getfattr/getfattr.c | |
parent | 1e3a6254eaa8082cd387921f9f1a182314d52d5a (diff) | |
download | attr-147c70650fb89f76d28b60fd5cb41cbcc468f831.tar.gz |
Merge of xfs-cmds-2.4.18:slinx:111470a by nathans.
remove off-by-one noop loop in listing attributes.
Diffstat (limited to 'getfattr/getfattr.c')
-rw-r--r-- | getfattr/getfattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 *), |