Skip to content

Commit 2d40e75

Browse files
committed
sonar fixes
1 parent d8f3646 commit 2d40e75

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

libjcore/code/jProcessUtil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,10 @@ JExecute
533533
close(fd[2][0]);
534534
close(fd[2][1]);
535535
}
536+
if (nullFile != nullptr)
537+
{
538+
fclose(nullFile);
539+
}
536540

537541
if (err == EAGAIN)
538542
{

tools/jx_layout_editor/code/LayoutWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ LayoutWidget::PrepareToAcceptDrag()
719719
{
720720
itsExpectingDragFlag = true;
721721

722-
const time_t now = time(NULL);
722+
const time_t now = time(nullptr);
723723
if (now <= itsLastExpectingTime + 1)
724724
{
725725
itsExpectingClickCount++;
@@ -780,7 +780,7 @@ LayoutWidget::HandleMouseDown
780780
const JXKeyModifiers& modifiers
781781
)
782782
{
783-
const time_t now = time(NULL);
783+
const time_t now = time(nullptr);
784784
if (now > itsLastExpectingTime + 1)
785785
{
786786
itsExpectingClickCount = 0;

0 commit comments

Comments
 (0)