sort(1): Remove unneeded initializations.
Found by: Clang static analyzer
This commit is contained in:
parent
109e2d29cc
commit
759a9a9d24
@ -268,7 +268,7 @@ bwscsbdup(const unsigned char *str, size_t len)
|
||||
const char *s;
|
||||
size_t charlen, chars, cptr;
|
||||
|
||||
charlen = chars = 0;
|
||||
chars = 0;
|
||||
cptr = 0;
|
||||
s = (const char *) str;
|
||||
|
||||
@ -581,7 +581,6 @@ bwsncmp(const struct bwstring *bws1, const struct bwstring *bws2,
|
||||
size_t cmp_len, len1, len2;
|
||||
int res = 0;
|
||||
|
||||
cmp_len = 0;
|
||||
len1 = bws1->len;
|
||||
len2 = bws2->len;
|
||||
|
||||
|
@ -330,8 +330,6 @@ find_field_end(const struct bwstring *s, struct key_specs *ks)
|
||||
size_t f2, next_field_start, pos_end;
|
||||
bool empty_field, empty_key;
|
||||
|
||||
pos_end = 0;
|
||||
next_field_start = 0;
|
||||
empty_field = false;
|
||||
empty_key = false;
|
||||
f2 = ks->f2;
|
||||
@ -827,7 +825,6 @@ numcoll_impl(struct key_value *kv1, struct key_value *kv2,
|
||||
main1 = main2 = 0;
|
||||
frac1 = frac2 = 0;
|
||||
|
||||
cmp_res = 0;
|
||||
key1_read = key2_read = false;
|
||||
|
||||
if (debug_sort) {
|
||||
|
@ -631,7 +631,6 @@ file_reader_init(const char *fsrc)
|
||||
int fd, flags;
|
||||
|
||||
flags = MAP_NOCORE | MAP_NOSYNC;
|
||||
addr = MAP_FAILED;
|
||||
|
||||
fd = open(fsrc, O_RDONLY);
|
||||
if (fd < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user