You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2017/05/15 16:19:43 UTC
[trafficserver] branch master updated: Coverity 1375119: unchecked
return value
This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 7d095b3 Coverity 1375119: unchecked return value
7d095b3 is described below
commit 7d095b37844ea69370414c42c768b4fe798d4b30
Author: Kit Chan <ki...@apache.org>
AuthorDate: Mon May 15 07:46:27 2017 -0700
Coverity 1375119: unchecked return value
---
plugins/experimental/ts_lua/ts_lua_fetch.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/plugins/experimental/ts_lua/ts_lua_fetch.c b/plugins/experimental/ts_lua/ts_lua_fetch.c
index cba3b08..cf5d5e9 100644
--- a/plugins/experimental/ts_lua/ts_lua_fetch.c
+++ b/plugins/experimental/ts_lua/ts_lua_fetch.c
@@ -269,11 +269,11 @@ ts_lua_fetch_one_item(lua_State *L, const char *url, size_t url_len, ts_lua_fetc
clientaddr.sin_port = htons(port);
if (!inet_aton(ipstr, (struct in_addr *)&clientaddr.sin_addr.s_addr)) {
p = NULL;
- TSError("[%s] Client ip parse failed! Using defualt. [ip: %s]", TS_LUA_DEBUG_TAG, ipstr);
+ TSError("[%s] Client ip parse failed! Using default. [ip: %s]", TS_LUA_DEBUG_TAG, ipstr);
}
} else {
p = NULL;
- TSError("[%s] Client ip parse failed! Using defualt. [addrstr: %s]", TS_LUA_DEBUG_TAG, addr);
+ TSError("[%s] Client ip parse failed! Using default. [addrstr: %s]", TS_LUA_DEBUG_TAG, addr);
}
}
@@ -282,7 +282,9 @@ ts_lua_fetch_one_item(lua_State *L, const char *url, size_t url_len, ts_lua_fetc
if (!p) {
clientaddr.sin_port = htons(TS_LUA_FETCH_CLIENT_PORT);
- inet_aton(TS_LUA_FETCH_CLIENT_ADDRESS, (struct in_addr *)&clientaddr.sin_addr.s_addr);
+ if (!inet_aton(TS_LUA_FETCH_CLIENT_ADDRESS, (struct in_addr *)&clientaddr.sin_addr.s_addr)) {
+ TSError("[%s] Error using default for client ip in fetch API. [ip: %s]", TS_LUA_DEBUG_TAG, TS_LUA_FETCH_CLIENT_ADDRESS);
+ }
}
/* option */
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].