[network-manager-openconnect/NM_0_8] Fix error check for write() failing.



commit aaa3b269e862e0acbe4084539e4fd5aef03b83cb
Author: David Woodhouse <David Woodhouse intel com>
Date:   Mon May 21 15:12:16 2012 +0100

    Fix error check for write() failing.
    
    It's cosmetic, since we're doing nothing anyway and we only did it to shut
    the compiler up. But we ought to get it right.
    (cherry picked from commit 64be7353da3f9bb06f4e852d1fe604dea982f673)

 auth-dialog/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 2dc55af..5febfb8 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -1284,7 +1284,7 @@ static void dialog_response (GtkDialog *dialog, int response, auth_ui_data *ui_d
 {
 	switch (response) {
 	case AUTH_DIALOG_RESPONSE_CANCEL:
-		if (write(ui_data->cancel_pipes[1], "x", 1)) {
+		if (write(ui_data->cancel_pipes[1], "x", 1) < 0) {
 			/* Pfft. Not a lot we can do about it */
 		}
 		/* Fall through... */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]