static const char *config_keys[] = {"ReportV2", "ReportV3", "ReportV4"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static _Bool report_v2 = 1;
-static _Bool report_v3 = 1;
-static _Bool report_v4 = 1;
+static bool report_v2 = true;
+static bool report_v3 = true;
+static bool report_v4 = true;
/*
see /proc/net/rpc/nfs
static int nfs_submit_nfs4_server(const char *instance, char **fields,
size_t fields_num) {
- static int suppress_warning = 0;
+ static int suppress_warning;
size_t proc4x_names_num;
switch (fields_num) {
size_t fields_num) {
size_t proc40_names_num, proc4x_names_num;
- static int suppress_warning = 0;
+ static int suppress_warning;
switch (fields_num) {
case 34:
static void nfs_read_linux(FILE *fh, const char *inst) {
char buffer[1024];
- char *fields[64];
+ // The stats line is prefixed with type and number of fields, thus plus 2
+ char *fields[MAX(NFS4_SERVER_MAX_PROC, NFS4_CLIENT_MAX_PROC) + 2];
int fields_num = 0;
if (fh == NULL)