diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:21 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:21 +0000 |
commit | d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c (patch) | |
tree | faac99f51f182bb8c0a03e95e393d421ac9ddf42 /src/procfile.h | |
parent | New upstream version 1.9.0+dfsg (diff) | |
download | netdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.tar.xz netdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.zip |
New upstream version 1.10.0+dfsgupstream/1.10.0+dfsg
Diffstat (limited to '')
-rw-r--r-- | src/procfile.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/procfile.h b/src/procfile.h index 98765697..012c6efe 100644 --- a/src/procfile.h +++ b/src/procfile.h @@ -107,7 +107,7 @@ extern char *procfile_filename(procfile *ff); extern int procfile_adaptive_initial_allocation; // return the number of lines present -#define procfile_lines(ff) (ff->lines->len) +#define procfile_lines(ff) ((ff)->lines->len) // return the number of words of the Nth line #define procfile_linewords(ff, line) (((line) < procfile_lines(ff)) ? (ff)->lines->lines[(line)].words : 0) @@ -119,6 +119,6 @@ extern int procfile_adaptive_initial_allocation; #define procfile_line(ff, line) (((line) < procfile_lines(ff)) ? procfile_word((ff), (ff)->lines->lines[(line)].first) : "") // return the Nth word of the current line -#define procfile_lineword(ff, line, word) (((line) < procfile_lines(ff) && (word) < procfile_linewords(ff, (line))) ? procfile_word((ff), (ff)->lines->lines[(line)].first + word) : "") +#define procfile_lineword(ff, line, word) (((line) < procfile_lines(ff) && (word) < procfile_linewords((ff), (line))) ? procfile_word((ff), (ff)->lines->lines[(line)].first + (word)) : "") #endif /* NETDATA_PROCFILE_H */ |