Skip to content

Commit 0745f88

Browse files
juanarboltargos
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 9c18838 commit 0745f88

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/node_os.cc

-4
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,12 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
137137

138138
static void GetFreeMemory(const FunctionCallbackInfo<Value>& args) {
139139
double amount = uv_get_free_memory();
140-
if (amount < 0)
141-
return;
142140
args.GetReturnValue().Set(amount);
143141
}
144142

145143

146144
static void GetTotalMemory(const FunctionCallbackInfo<Value>& args) {
147145
double amount = uv_get_total_memory();
148-
if (amount < 0)
149-
return;
150146
args.GetReturnValue().Set(amount);
151147
}
152148

0 commit comments

Comments
 (0)