Skip to content

Commit 40b1eac

Browse files
Apply suggestions from code review
Co-authored-by: Max Horn <[email protected]>
1 parent f463762 commit 40b1eac

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/profile.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static inline void printOutput(UInt line, int nameid, int exec, int visited)
488488
BOOL markVisited(int nameid, UInt line)
489489
{
490490
if (nameid == 0 || line == 0) {
491-
return 1;
491+
return TRUE;
492492
}
493493

494494
if (LEN_PLIST(profileState.visitedStatements) < nameid ||
@@ -501,11 +501,9 @@ BOOL markVisited(int nameid, UInt line)
501501

502502
if (LEN_PLIST(linelist) < line || !ELM_PLIST(linelist, line)) {
503503
AssPlist(linelist, line, True);
504-
return 0;
505-
}
506-
else {
507-
return 1;
504+
return FALSE;
508505
}
506+
return TRUE;
509507
}
510508

511509
// Return TRUE is Stat has been visited (executed) before
@@ -515,12 +513,12 @@ BOOL visitedStat(Stat stat)
515513
int line = LINE_STAT(stat);
516514

517515
if (nameid == 0 || line == 0) {
518-
return 1;
516+
return TRUE;
519517
}
520518

521519
if (LEN_PLIST(profileState.visitedStatements) < nameid ||
522520
!ELM_PLIST(profileState.visitedStatements, nameid)) {
523-
return 1;
521+
return FALSE;
524522
}
525523

526524
Obj linelist = ELM_PLIST(profileState.visitedStatements, nameid);

0 commit comments

Comments
 (0)