result:
ok(ret == 0, "Metadata string is valid");
- if (ret && metadata_fd > 0 && parser_output_fd > 0) {
+ if (ret && metadata_fd >= 0 && parser_output_fd >= 0) {
char *line;
size_t len = METADATA_LINE_SIZE;
FILE *metadata_fp = NULL, *parser_output_fp = NULL;
}
}
- if (parser_output_fd > 0) {
+ if (parser_output_fd >= 0) {
if (close(parser_output_fd)) {
diag("close error");
}
}
- if (metadata_fd > 0) {
+ if (metadata_fd >= 0) {
if (close(metadata_fd)) {
diag("close error");
}
result:
ok(ret == 0, "Babeltrace could read the resulting trace");
- if (ret && babeltrace_output_fd > 0) {
+ if (ret && babeltrace_output_fd >= 0) {
char *line;
size_t len = METADATA_LINE_SIZE;
FILE *babeltrace_output_fp = NULL;
}
}
- if (babeltrace_output_fd > 0) {
+ if (babeltrace_output_fd >= 0) {
if (close(babeltrace_output_fd)) {
diag("close error");
}