Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/nfdump-filter-ng'
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Feb 17, 2024
2 parents 4f409e9 + bc08a0a commit 466c27b
Show file tree
Hide file tree
Showing 95 changed files with 12,191 additions and 12,464 deletions.
4 changes: 0 additions & 4 deletions man/nfdump.1
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,6 @@ Print full record as a separate json object.
Legacy .csv format - will get removed in future releases. Please use
.Sy json
instead.
.It Cm pipe
Legacy '|' separated format - will get removed in future releases. Please use
.Sy json
instead.
.El
.Pp
Already predefined fmt formats:
Expand Down
10 changes: 8 additions & 2 deletions src/collector/collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,15 @@ int ScanExtension(char *extensionList) {
if (list == NULL) return -1;

// last entry
if (s == NULL) return 0;
if (*s == '\0') return 0;
if (s == NULL || *s == '\0') {
free(list);
list = s = NULL;
return 0;
}

// scan next extension number

// skip white space
while (*s && isspace(*s)) s++;

// next separator
Expand All @@ -484,6 +489,7 @@ int ScanExtension(char *extensionList) {

// wrong range of extension
if (num == 0 || num >= MAXEXTENSIONS) {
free(list);
s = list = NULL;
return -1;
}
Expand Down
Loading

0 comments on commit 466c27b

Please sign in to comment.