summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-06-06 21:16:26 +0000
committerdim <dim@FreeBSD.org>2012-06-06 21:16:26 +0000
commit92080af158d046c609ec13db339cdb6ca602e274 (patch)
treedc6405b6650180193b1027284bd14354f728f9a2 /lib
parenta70df32bec40514d97239c1e8e697786354f31e4 (diff)
downloadFreeBSD-src-92080af158d046c609ec13db339cdb6ca602e274.zip
FreeBSD-src-92080af158d046c609ec13db339cdb6ca602e274.tar.gz
Fix two warnings about self-assignment in libc. These normally only
trigger with clang, when you either use -save-temps, or ccache. Reported by: Sevan / Venture37 <venture37@gmail.com> MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/include/port_before.h2
-rw-r--r--lib/libc/net/getaddrinfo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/include/port_before.h b/lib/libc/include/port_before.h
index beef71d..304dd66 100644
--- a/lib/libc/include/port_before.h
+++ b/lib/libc/include/port_before.h
@@ -17,6 +17,6 @@
var = _u.v; \
} while (0)
-#define UNUSED(x) (x) = (x)
+#define UNUSED(x) (void)(x)
#endif /* _PORT_BEFORE_H_ */
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 8083c39..dc2641f 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -464,7 +464,7 @@ getaddrinfo(const char *hostname, const char *servname,
}
error = get_portmatch(pai, servname);
if (error)
- ERR(error);
+ goto bad;
*pai = ai0;
}
OpenPOWER on IntegriCloud