diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-06-22 21:57:13 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-06-29 12:21:13 +0200 |
commit | ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac (patch) | |
tree | ea4c64d1d822e25c884f9933c0268888d5e4d0e0 /src/spawn_sync.h | |
parent | c50e19220453039b08065f50eb2cd1713c402c4e (diff) | |
download | android-node-v8-ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac.tar.gz android-node-v8-ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac.tar.bz2 android-node-v8-ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac.zip |
src: fix bad logic in uid/gid checks
Pointed out by Coverity. Introduced in commits 3546383c ("process_wrap:
avoid leaking memory when throwing due to invalid arguments") and
fa4eb47c ("bindings: add spawn_sync bindings").
The return statements inside the if blocks were dead code because their
guard conditions always evaluated to false. Remove them.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/spawn_sync.h')
-rw-r--r-- | src/spawn_sync.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/spawn_sync.h b/src/spawn_sync.h index 8ddba479f3..8f4c05aa5f 100644 --- a/src/spawn_sync.h +++ b/src/spawn_sync.h @@ -175,7 +175,6 @@ class SyncProcessRunner { inline int AddStdioInheritFD(uint32_t child_fd, int inherit_fd); static bool IsSet(Local<Value> value); - template <typename t> static bool CheckRange(Local<Value> js_value); int CopyJsString(Local<Value> js_value, const char** target); int CopyJsStringArray(Local<Value> js_value, char** target); |