library: if the VAL type is wrong still return a value

Rather than return a 0 result for all VAL type errors,
return what would have been without validation active.

This will enable a program like pgrep to still print a
result even though it used some incorrect type member.

With this commit, our VAL macro validations logic will
behave in exactly the same way as the GET validations.
While warning messages may be issued, except for a bad
enumerator, values will always be returned to callers.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2016-08-08 11:22:33 -05:00
committed by Craig Small
parent c0f33884b5
commit 7d20df9ef0
6 changed files with 0 additions and 6 deletions

View File

@ -1304,7 +1304,6 @@ PROCPS_EXPORT struct vmstat_result *xtra_vmstat_val (
if (str[0]
&& (strcmp(typestr, str))) {
fprintf(stderr, "%s line %d: was %s, expected %s\n", file, lineno, typestr, str);
return NULL;
}
return &stack->head[relative_enum];
} // end: xtra_vmstat_val