diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-17 14:28:00 +0300 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-17 14:28:00 +0300 |
commit | e766715032fa14ae60a053c41a1eeeb6046e19e2 (patch) | |
tree | b22a4e9950702bc3491176f0c46f01926e3113af /coreutils/sort.c | |
parent | b3a071543d777b1f6f7f31a326fefd17f1cf4951 (diff) |
- end may be used uninitialized.
- TODO: should eventually use skip_whitespace there
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r-- | coreutils/sort.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c index 1ba05ecd7..a6c56ad88 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -51,7 +51,7 @@ static struct sort_key static char *get_key(char *str, struct sort_key *key, int flags) { - int start=0,end,len,i,j; + int start = 0, end = 0, len, i, j; /* Special case whole string, so we don't have to make a copy */ if(key->range[0]==1 && !key->range[1] && !key->range[2] && !key->range[3] @@ -83,6 +83,7 @@ static char *get_key(char *str, struct sort_key *key, int flags) /* Key with explicit separator starts after separator */ if(key_separator && str[start]==key_separator) start++; /* Strip leading whitespace if necessary */ +//XXX: skip_whitespace() if(flags&FLAG_b) while(isspace(str[start])) start++; /* Strip trailing whitespace if necessary */ if(flags&FLAG_bb) while(end>start && isspace(str[end-1])) end--; |