]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Implicitly ignore memmove and memcpy return values in path-util
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Mon, 30 Jan 2017 17:45:28 +0000 (19:45 +0200)
committerGitLab <gitlab@git.dovecot.net>
Tue, 31 Jan 2017 16:06:12 +0000 (18:06 +0200)
This is because dovecot code doesn't explicitly ignore the return values
of those functions elsewhere either.

src/lib/path-util.c

index 4d0188e5a12bda1ac0bd8d689cf1138a805229a2..d678909e4cec413d6fcfca109521179a90c531e6 100644 (file)
@@ -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';