Skip to content

Commit

Permalink
check: don't use uninitialized variables
Browse files Browse the repository at this point in the history
CID 154853 (#1 of 1): Uninitialized scalar variable (UNINIT)
7. uninit_use_in_call: Using uninitialized value c when calling write.

Reported-by: coverity
  • Loading branch information
avagin committed Nov 26, 2015
1 parent 759a1c8 commit 84add73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cr-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static pid_t fork_and_ptrace_attach(int (*child_setup)(void))
{
pid_t pid;
int sk_pair[2], sk;
char c;
char c = 0;

if (socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sk_pair)) {
pr_perror("socketpair");
Expand Down

0 comments on commit 84add73

Please sign in to comment.