From: Martti Rannanjärvi Date: Mon, 30 Jan 2017 17:45:28 +0000 (+0200) Subject: lib: Implicitly ignore memmove and memcpy return values in path-util X-Git-Tag: 2.3.0.rc1~2203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f2c34337beaa8912830ca3f81aa03e46b3a3874;p=thirdparty%2Fdovecot%2Fcore.git lib: Implicitly ignore memmove and memcpy return values in path-util This is because dovecot code doesn't explicitly ignore the return values of those functions elsewhere either. --- diff --git a/src/lib/path-util.c b/src/lib/path-util.c index 4d0188e5a1..d678909e4c 100644 --- a/src/lib/path-util.c +++ b/src/lib/path-util.c @@ -103,7 +103,7 @@ static int path_normalize(const char *path, bool resolve_links, /* copy segment to normalized path */ i_assert((npath_pos + seglen) < (npath + asize)); - (void)memmove(npath_pos, p, seglen); + memmove(npath_pos, p, seglen); npath_pos += seglen; } @@ -146,7 +146,7 @@ static int path_normalize(const char *path, bool resolve_links, if (ltlen > 0) { /* preserve tail just after end of npath */ - (void)memmove(npath_pos + 1, segend, ltlen); + memmove(npath_pos + 1, segend, ltlen); } /* read the symlink after the preserved tail */ @@ -189,10 +189,10 @@ static int path_normalize(const char *path, bool resolve_links, /* add tail of previous path at end of symlink */ if (ltlen > 0) { i_assert(npath_pos + 1 + tlen < npath + asize); - (void)memcpy(npath_link + ret, npath_pos + 1, tlen); + memcpy(npath_link + ret, npath_pos + 1, tlen); } else { i_assert(segend + tlen < npath + asize); - (void)memcpy(npath_link + ret, segend, tlen); + memcpy(npath_link + ret, segend, tlen); } *(npath_link+ret+tlen) = '\0';