<div dir="ltr">Applied.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 20, 2017 at 2:39 PM, Gris Ge <span dir="ltr"><<a href="mailto:fge@redhat.com" target="_blank">fge@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Enforce what mpath_cmd.h states "-1 on failure (with errno set)" for<br>
mpath_recv_reply() by set errno and return -1 on failure.<br>
<br>
Signed-off-by: Gris Ge <<a href="mailto:fge@redhat.com">fge@redhat.com</a>><br>
---<br>
 libmpathcmd/mpath_cmd.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/libmpathcmd/mpath_cmd.c b/libmpathcmd/mpath_cmd.c<br>
index 7fc9e98..856e6b4 100644<br>
--- a/libmpathcmd/mpath_cmd.c<br>
+++ b/libmpathcmd/mpath_cmd.c<br>
@@ -141,7 +141,7 @@ int mpath_recv_reply(int fd, char **reply, unsigned int timeout)<br>
        *reply = NULL;<br>
        len = mpath_recv_reply_len(fd, timeout);<br>
        if (len <= 0)<br>
-               return len;<br>
+               return -1;<br>
        *reply = malloc(len);<br>
        if (!*reply)<br>
                return -1;<br>
@@ -149,7 +149,7 @@ int mpath_recv_reply(int fd, char **reply, unsigned int timeout)<br>
        if (err) {<br>
                free(*reply);<br>
                *reply = NULL;<br>
-               return err;<br>
+               return -1;<br>
        }<br>
        return 0;<br>
 }<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
--<br>
dm-devel mailing list<br>
<a href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/dm-devel" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/dm-devel</a><br>
</font></span></blockquote></div><br></div>