[PATCH] core: check the return status properly



According to the manpage, we have to check WIFEXITED() before
calling WEXITSTATUS().
---
 src/nm-activation-request.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
index 3fc7b53..6ab25e4 100644
--- a/src/nm-activation-request.c
+++ b/src/nm-activation-request.c
@@ -305,7 +305,7 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared)
 				             error ? error->code : -1,
 				             (error && error->message) ? error->message : "(unknown)");
 				g_clear_error (&error);
-			} else if (WEXITSTATUS (status)) {
+			} else if (WIFEXITED (status)) {
 				nm_log_warn (LOGD_SHARING, "** Command returned exit status %d.",
 				             WEXITSTATUS (status));
 			}
-- 
1.7.7



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