projects
/
deliverable
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linter fix: comparison of fd >= 0
[deliverable/babeltrace.git]
/
tests
/
lib
/
test_ctf_writer.c
diff --git
a/tests/lib/test_ctf_writer.c
b/tests/lib/test_ctf_writer.c
index 8c168edbe06dd6b58927f0002ff20edf4af739ea..d55c6297b20e70dd2646563794ec681b12ee6aaf 100644
(file)
--- a/
tests/lib/test_ctf_writer.c
+++ b/
tests/lib/test_ctf_writer.c
@@
-100,7
+100,7
@@
void validate_metadata(char *parser_path, char *metadata_path)
result:
ok(ret == 0, "Metadata string is valid");
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;
char *line;
size_t len = METADATA_LINE_SIZE;
FILE *metadata_fp = NULL, *parser_output_fp = NULL;
@@
-150,12
+150,12
@@
close_fp:
}
}
}
}
- if (parser_output_fd > 0) {
+ if (parser_output_fd >
=
0) {
if (close(parser_output_fd)) {
diag("close error");
}
}
if (close(parser_output_fd)) {
diag("close error");
}
}
- if (metadata_fd > 0) {
+ if (metadata_fd >
=
0) {
if (close(metadata_fd)) {
diag("close error");
}
if (close(metadata_fd)) {
diag("close error");
}
@@
-207,7
+207,7
@@
void validate_trace(char *parser_path, char *trace_path)
result:
ok(ret == 0, "Babeltrace could read the resulting trace");
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;
char *line;
size_t len = METADATA_LINE_SIZE;
FILE *babeltrace_output_fp = NULL;
@@
-237,7
+237,7
@@
close_fp:
}
}
}
}
- if (babeltrace_output_fd > 0) {
+ if (babeltrace_output_fd >
=
0) {
if (close(babeltrace_output_fd)) {
diag("close error");
}
if (close(babeltrace_output_fd)) {
diag("close error");
}
This page took
0.032537 seconds
and
5
git commands to generate.