diff options
author | Amit Shah <amit.shah@redhat.com> | 2009-10-28 18:49:32 +0530 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2009-10-29 19:59:10 +0530 |
commit | 8d23286cd8293634d5aa578e8bfff46fee3c2977 (patch) | |
tree | c07bf294acc77e45920856f6ded75b84a25dec1f /auto-virtserial-guest.c | |
parent | b848299eceb155dff6c5b847e9d81f5ba0453492 (diff) | |
download | test-virtserial-8d23286cd8293634d5aa578e8bfff46fee3c2977.tar.gz test-virtserial-8d23286cd8293634d5aa578e8bfff46fee3c2977.tar.xz test-virtserial-8d23286cd8293634d5aa578e8bfff46fee3c2977.zip |
auto-test: Fix some warnings pointed out by clang
1. don't assign to 'ret' the o/p of fns that we don't intend to use later
2. Ensure 'ret' actually contains the value we want
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'auto-virtserial-guest.c')
-rw-r--r-- | auto-virtserial-guest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auto-virtserial-guest.c b/auto-virtserial-guest.c index 510ffc5..645ce2e 100644 --- a/auto-virtserial-guest.c +++ b/auto-virtserial-guest.c @@ -162,7 +162,7 @@ static int spawn_console(int val) char *argv[] = { "/sbin/agetty", "/dev/hvc0", "9600", "vt100" }; char *envp[] = { NULL }; - ret = execve("/sbin/agetty", argv, envp); + execve("/sbin/agetty", argv, envp); error(errno, errno, "execve"); } return 0; @@ -273,7 +273,7 @@ static int check_udev(int nr) for (i = 0; i < ret; i++) { if (buf[i] != filename[i]) { ret = -ERANGE; - break; + goto out; } } ret = 0; |