Skip to content

Commit d53c443

Browse files
committed
Teach coverity that pipe initializes its argument
Call pipe2 for a return value, so that coverity cannot infer a fixed return value.
1 parent 79fd3d3 commit d53c443

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

coverity/modeling.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@
66
void error(int errnum, const char *format, ...) {
77
__coverity_panic__();
88
}
9+
10+
int pipe(int pipefd[2]) {
11+
pipefd[0] = 1;
12+
pipefd[2] = 2;
13+
return pipe2(pipefd, 0);
14+
}

0 commit comments

Comments
 (0)