diff options
author | Bert Belder <bertbelder@gmail.com> | 2011-06-08 05:57:15 +0400 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2011-06-08 07:06:09 +0400 |
commit | 5c9a262eb0796981fdd07414ac61d2ff8e05b0be (patch) | |
tree | bef9f07c955d3f6c48821fed58b4ae86a090b1d6 | |
parent | 7a5977b5d61186baaa71b19349f3fdfa41e6042e (diff) |
Compatibility issue and warning in x-forwarded-for dtrace probe
-rw-r--r-- | src/node_dtrace.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index ac14bda104c..fc820159225 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. #include <node_dtrace.h> -#include <strings.h> +#include <string.h> #ifdef HAVE_DTRACE #include "node_provider.h" @@ -191,7 +191,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { Local<Object> arg0 = Local<Object>::Cast(args[0]); Local<Object> headers; - bzero(&req, sizeof(req)); + memset(&req, 0, sizeof(req)); req._un.version = 1; SLURP_STRING(arg0, url, &req.url); SLURP_STRING(arg0, method, &req.method); @@ -206,7 +206,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { String::Utf8Value fwdfor(strfwdfor->ToString()); if (!strfwdfor->IsString() || (req.forwardedFor = *fwdfor) == NULL) - req.forwardedFor = ""; + req.forwardedFor = const_cast<char*>(""); SLURP_CONNECTION(args[1], conn); |