diff options
author | rlar <rlar> | 2016-03-01 18:22:25 +0100 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-03-12 14:12:49 -0500 |
commit | bdc999cbc1b2e5e45af661849175dce5fe1c4036 (patch) | |
tree | e1f68b644ead2d95fca2adcec3ee51450a5df0d3 /src | |
parent | fb60d5a04e89329613942e9fca6ef2fa6b67f694 (diff) |
improve readability
Diffstat (limited to 'src')
-rw-r--r-- | src/regex.c | 2 | ||||
-rw-r--r-- | src/tables.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/regex.c b/src/regex.c index b44d958..2eacacc 100644 --- a/src/regex.c +++ b/src/regex.c @@ -82,7 +82,7 @@ char *regmatch_dup (regmatch_t * m, const char *src) char *str; size_t len; - if (m == NULL || m->rm_so < 0) + if (m == NULL || m->rm_so < 0 || m->rm_eo < m->rm_so) return NULL; len = (size_t) (m->rm_eo - m->rm_so); str = malloc((len + 1) * sizeof(char)); diff --git a/src/tables.c b/src/tables.c index 30828a6..980d2e9 100644 --- a/src/tables.c +++ b/src/tables.c @@ -437,7 +437,7 @@ static size_t min_int_size (struct yytbl_data *tbl) n = abs (yytbl_data_geti (tbl, i)); - if (n > max) + if (max < n) max = n; } |