Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 434e8b8

Browse files
committed
src: use single-line return statement for null-pointer condition
1 parent 03922c0 commit 434e8b8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/large_pages/node_large_page.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,7 @@ bool IsTransparentHugePagesConfigured(std::istream* configuration) {
279279

280280
bool IsTransparentHugePagesEnabled() {
281281
std::istream* configuration = GetTransparentHugePagesConfiguration();
282-
if (configuration == nullptr) {
283-
return false;
284-
}
282+
if (configuration == nullptr) return false;
285283
bool enabled = IsTransparentHugePagesConfigured(configuration);
286284
delete configuration;
287285
return enabled;

0 commit comments

Comments
 (0)