diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-05 18:20:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-05 18:20:22 +0000 |
commit | 1e08514471896e3b3069cdc25f457036d257cc68 (patch) | |
tree | b591aa5d3eac5fec70d137d664ccc4b95db63cc4 /src/libutil/diff.c | |
parent | 9068c5040e2737ce70f0cc9498000efa30c14c74 (diff) | |
download | rspamd-1e08514471896e3b3069cdc25f457036d257cc68.tar.gz rspamd-1e08514471896e3b3069cdc25f457036d257cc68.zip |
Fix potential issues as found by coverity.
Diffstat (limited to 'src/libutil/diff.c')
-rw-r--r-- | src/libutil/diff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libutil/diff.c b/src/libutil/diff.c index 135c74624..1e6af6131 100644 --- a/src/libutil/diff.c +++ b/src/libutil/diff.c @@ -268,6 +268,9 @@ _ses (const void *a, gint aoff, gint n, const void *b, gint boff, * - | */ + /* + * XXX: coverity found this code suspicious, needs checking + */ if (m > n) { if (x == u) { _edit (ctx, DIFF_MATCH, aoff, n); @@ -300,7 +303,6 @@ rspamd_diff (const void *a, gint aoff, gint n, const void *b, gint boff, gint m, { struct _ctx ctx; gint d, x, y; - struct diff_edit *e = NULL; GArray *tmp; tmp = g_array_sized_new (FALSE, TRUE, sizeof(gint), dmax); @@ -327,9 +329,6 @@ rspamd_diff (const void *a, gint aoff, gint n, const void *b, gint boff, gint m, g_array_free (tmp, TRUE); return -1; } - if (ses && sn && e) { - *sn = e->op ? ctx.si + 1 : 0; - } g_array_free (tmp, TRUE); return d; |