Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Max Horn <[email protected]>
  • Loading branch information
ChrisJefferson and fingolfin authored Dec 23, 2022
1 parent f463762 commit 40b1eac
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ static inline void printOutput(UInt line, int nameid, int exec, int visited)
BOOL markVisited(int nameid, UInt line)
{
if (nameid == 0 || line == 0) {
return 1;
return TRUE;
}

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

if (LEN_PLIST(linelist) < line || !ELM_PLIST(linelist, line)) {
AssPlist(linelist, line, True);
return 0;
}
else {
return 1;
return FALSE;
}
return TRUE;
}

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

if (nameid == 0 || line == 0) {
return 1;
return TRUE;
}

if (LEN_PLIST(profileState.visitedStatements) < nameid ||
!ELM_PLIST(profileState.visitedStatements, nameid)) {
return 1;
return FALSE;
}

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

0 comments on commit 40b1eac

Please sign in to comment.