Skip to content

Commit

Permalink
simplified pointer control
Browse files Browse the repository at this point in the history
  • Loading branch information
Tylerlhess committed Jan 15, 2025
1 parent 3c2dc88 commit 9cf4ace
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/analysisd/cleanevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ int OS_CleanMSG(char *msg, Eventinfo *lf)
if (pieces[0] == '<') {
/* Increment past the < */
pieces++;
lf->log++;
/*move past the 1-3 digits
Increment lf->log along the way */
while (isdigit((int)*pieces)) {
pieces++;
lf->log++;
}
if (
(pieces[0] == '>') &&
Expand All @@ -120,13 +118,12 @@ int OS_CleanMSG(char *msg, Eventinfo *lf)
pieces += 2;
pieces[0] = '\0';
pieces++;
lf->log += 3;
lf->log = pieces;
} else {
/* Walk back to the beginning as not Syslog protocol 23 */
pieces--;
while (isdigit((int)*pieces)) {
pieces--;
lf->log--;
}

}
Expand Down

0 comments on commit 9cf4ace

Please sign in to comment.