From 3bd48a85213d5bc26b92e05e1d3dcc6e266c7cda Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 14 Jun 2011 11:25:28 +0200 Subject: [PATCH] lib/dewey.c: minor cosmetic changes. --- lib/dewey.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/dewey.c b/lib/dewey.c index ed9348cf..5a633cc6 100644 --- a/lib/dewey.c +++ b/lib/dewey.c @@ -146,8 +146,8 @@ mkcomponent(arr_t *ap, const char *num) } } else { ap->size *= 2; - if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) - == NULL) { + ap->v = realloc(ap->v, ap->size * sizeof(int)); + if (ap->v == NULL) { xbps_dbg_printf("%s: realloc ENOMEM\n", __func__); exit(EXIT_FAILURE); @@ -342,8 +342,7 @@ dewey_match(const char *pattern, const char *pkg) strlcpy(ver, sep, MIN((ssize_t)sizeof(ver), sep2-sep+1)); if (dewey_cmp(version, op, ver)) return 1; - } - else { + } else { if (dewey_cmp(version, op, sep)) return 1; }