summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 3b0368c)
raw | patch | inline | side by side (from parent 1: 3b0368c)
author | Vishal Mahaveer <vishalm@ti.com> | |
Fri, 26 Aug 2016 19:15:46 +0000 (14:15 -0500) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Wed, 31 Aug 2016 18:37:33 +0000 (13:37 -0500) |
With latest Android N compiler, we get following error. Fixing it by
removing the always true check.
linux/src/api/NameServer.c:311:17: error: comparison of array 'rsp.get.buf'
not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
if (rsp.get.buf != NULL) {
~~~~~~~~^~~ ~~~~
linux/src/api/NameServer.c:453:17: error: comparison of array 'rsp.get.buf'
not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
if (rsp.get.buf != NULL) {
~~~~~~~~^~~ ~~~~
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
removing the always true check.
linux/src/api/NameServer.c:311:17: error: comparison of array 'rsp.get.buf'
not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
if (rsp.get.buf != NULL) {
~~~~~~~~^~~ ~~~~
linux/src/api/NameServer.c:453:17: error: comparison of array 'rsp.get.buf'
not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
if (rsp.get.buf != NULL) {
~~~~~~~~^~~ ~~~~
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
linux/src/api/NameServer.c | patch | blob | history |
index 73b43c266182335f37d1a99e91a2162cd2071c66..9cc761ab1cf2dee82b7ba0b88bc16c4671af9a4c 100644 (file)
}
*len = rsp.get.len;
- if (rsp.get.buf != NULL) {
- memcpy(buf, rsp.get.buf, *len);
- }
+ memcpy(buf, rsp.get.buf, *len);
status = rsp.get.status;
@@ -450,9 +448,7 @@ Int NameServer_getLocal(NameServer_Handle ns, String name, Ptr buf, UInt32 *len)
}
*len = rsp.get.len;
- if (rsp.get.buf != NULL) {
- memcpy(buf, rsp.get.buf, *len);
- }
+ memcpy(buf, rsp.get.buf, *len);
status = rsp.get.status;