[PATCH] core: check the return status properly
- From: Gary Ching-Pang Lin <chingpang gmail com>
- To: networkmanager-list gnome org
- Subject: [PATCH] core: check the return status properly
- Date: Tue, 13 Mar 2012 17:09:15 +0800
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]