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 <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
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

-4
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)