Skip to content

Commit c1f54c7

Browse files
juanarbolBridgeAR
authored andcommitted
src: remove validation of unreachable code
Based on nodejs/help#2600 (comment) the condition (amount < 0) won't be possible. PR-URL: #32818 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]>
1 parent 0b2cff2 commit c1f54c7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/node_os.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,12 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
134134

135135
static void GetFreeMemory(const FunctionCallbackInfo<Value>& args) {
136136
double amount = uv_get_free_memory();
137-
if (amount < 0)
138-
return;
139137
args.GetReturnValue().Set(amount);
140138
}
141139

142140

143141
static void GetTotalMemory(const FunctionCallbackInfo<Value>& args) {
144142
double amount = uv_get_total_memory();
145-
if (amount < 0)
146-
return;
147143
args.GetReturnValue().Set(amount);
148144
}
149145

0 commit comments

Comments
 (0)