crfsd: prevent ipc_send_children from returning garbage
Alex Chiang
achiang at hp.com
Wed Apr 9 16:21:24 PDT 2008
If there are no children, ipc_send_children shouldn't just return
whatever garbage might be on the stack.
Initialize ret = 0 to prevent that.
Signed-off-by: Alex Chiang <achiang at hp.com>
---
diff -r da91356bfe57 crfsd/child.c
--- a/crfsd/child.c Mon Apr 07 17:52:34 2008 -0700
+++ b/crfsd/child.c Wed Apr 09 17:17:51 2008 -0600
@@ -237,7 +237,7 @@ int ipc_send_children(unsigned int comma
int cmd_fd)
{
struct child *child;
- int ret;
+ int ret = 0;
list_for_each_entry(child, &children, item) {
ret = ipc_send(child->fd, command, hdr, cmd_fd);
More information about the crfs-devel
mailing list