Skip to content

Commit f9b8988

Browse files
juanarbolBethGriggs
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 03d02d7 commit f9b8988

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
@@ -132,16 +132,12 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
132132

133133
static void GetFreeMemory(const FunctionCallbackInfo<Value>& args) {
134134
double amount = uv_get_free_memory();
135-
if (amount < 0)
136-
return;
137135
args.GetReturnValue().Set(amount);
138136
}
139137

140138

141139
static void GetTotalMemory(const FunctionCallbackInfo<Value>& args) {
142140
double amount = uv_get_total_memory();
143-
if (amount < 0)
144-
return;
145141
args.GetReturnValue().Set(amount);
146142
}
147143

0 commit comments

Comments
 (0)