diff options
author | seungha.son <seungha.son@samsung.com> | 2016-08-30 15:32:08 +0900 |
---|---|---|
committer | seungha.son <seungha.son@samsung.com> | 2016-08-30 15:33:23 +0900 |
commit | 75fc124fe2310b222d1f8bebdc72229dcbf13168 (patch) | |
tree | 3491f8769b9a17983dbac5b254ef603cf585ac96 | |
parent | 8f4d0f73e47345a9b15faa1fd756d7d5f70d6c62 (diff) | |
download | shortcut-75fc124fe2310b222d1f8bebdc72229dcbf13168.tar.gz shortcut-75fc124fe2310b222d1f8bebdc72229dcbf13168.tar.bz2 shortcut-75fc124fe2310b222d1f8bebdc72229dcbf13168.zip |
Changes error handling order
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I9a5c518caf4077b44fc09a2bee6c04dfce6ec33a
-rwxr-xr-x | lib/src/shortcut_manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/src/shortcut_manager.c b/lib/src/shortcut_manager.c index 6c43266..9e580fb 100755 --- a/lib/src/shortcut_manager.c +++ b/lib/src/shortcut_manager.c @@ -452,6 +452,9 @@ EAPI int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data) { int ret = _dbus_init(); + if (request_cb == NULL) + return SHORTCUT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */ + if (ret != SHORTCUT_ERROR_NONE) { /* LCOV_EXCL_START */ ErrPrint("Can't init dbus %d", ret); @@ -475,9 +478,6 @@ EAPI int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data) /* LCOV_EXCL_STOP */ } - if (request_cb == NULL) - return SHORTCUT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */ - if (provider_monitor_id == 0) { provider_monitor_id = g_bus_watch_name_on_connection( _gdbus_conn, |