diff options
Diffstat (limited to 'xdiff')
-rw-r--r-- | xdiff/xemit.c | 2 | ||||
-rw-r--r-- | xdiff/xmacros.h | 1 | ||||
-rw-r--r-- | xdiff/xprepare.c | 2 | ||||
-rw-r--r-- | xdiff/xutils.c | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/xdiff/xemit.c b/xdiff/xemit.c index 1cbf2b9..c4ccd68 100644 --- a/xdiff/xemit.c +++ b/xdiff/xemit.c @@ -65,7 +65,7 @@ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg) *xscr = xch; } - if (*xscr == NULL) + if (!*xscr) return NULL; lxch = *xscr; diff --git a/xdiff/xmacros.h b/xdiff/xmacros.h index 2809a28..ae4636c 100644 --- a/xdiff/xmacros.h +++ b/xdiff/xmacros.h @@ -34,7 +34,6 @@ #define XDL_ADDBITS(v,b) ((v) + ((v) >> (b))) #define XDL_MASKBITS(b) ((1UL << (b)) - 1) #define XDL_HASHLONG(v,b) (XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b)) -#define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0) #define XDL_LE32_PUT(p, v) \ do { \ unsigned char *__p = (unsigned char *) (p); \ diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c index 4527a4a..1057527 100644 --- a/xdiff/xprepare.c +++ b/xdiff/xprepare.c @@ -188,7 +188,7 @@ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_ memset(rhash, 0, hsize * sizeof(xrecord_t *)); nrec = 0; - if ((cur = blk = xdl_mmfile_first(mf, &bsize)) != NULL) { + if ((cur = blk = xdl_mmfile_first(mf, &bsize))) { for (top = blk + bsize; cur < top; ) { prev = cur; hav = xdl_hash_record(&cur, top, xpp->flags); diff --git a/xdiff/xutils.c b/xdiff/xutils.c index cfa6e22..115b2b1 100644 --- a/xdiff/xutils.c +++ b/xdiff/xutils.c @@ -122,7 +122,7 @@ long xdl_guess_lines(mmfile_t *mf, long sample) { long nl = 0, size, tsize = 0; char const *data, *cur, *top; - if ((cur = data = xdl_mmfile_first(mf, &size)) != NULL) { + if ((cur = data = xdl_mmfile_first(mf, &size))) { for (top = data + size; nl < sample && cur < top; ) { nl++; if (!(cur = memchr(cur, '\n', top - cur))) |