aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2022-05-03 07:57:47 +0900
committer坂本 貴史 <o-takashi@sakamocchi.jp>2022-05-03 08:31:29 +0900
commit9a7c2a8e59bc7cf956a0fc99ac1c6a06ac39416c (patch)
tree7fe1ea0a0d8c33ef0663cd988cb6a1fbe46031fe
parent45bbe017db3431f9c0b45123f0e57275b3370060 (diff)
downloadlibhinoko-9a7c2a8e59bc7cf956a0fc99ac1c6a06ac39416c.tar.gz
fw_iso_resource_once: minor code refactoring to check GError argument
This commit improves check of argument for GError. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--src/fw_iso_resource_once.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fw_iso_resource_once.c b/src/fw_iso_resource_once.c
index 3685b05..d377885 100644
--- a/src/fw_iso_resource_once.c
+++ b/src/fw_iso_resource_once.c
@@ -59,7 +59,7 @@ void hinoko_fw_iso_resource_once_allocate_async(HinokoFwIsoResourceOnce *self,
int i;
g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_ONCE(self));
- g_return_if_fail(error != NULL && *error == NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
g_return_if_fail(channel_candidates != NULL);
g_return_if_fail(channel_candidates_count > 0);
@@ -94,7 +94,7 @@ void hinoko_fw_iso_resource_once_deallocate_async(HinokoFwIsoResourceOnce *self,
struct fw_cdev_allocate_iso_resource res = {0};
g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_ONCE(self));
- g_return_if_fail(error != NULL && *error == NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
g_return_if_fail(channel < 64);
g_return_if_fail(bandwidth > 0);
@@ -130,7 +130,7 @@ void hinoko_fw_iso_resource_once_allocate_sync(HinokoFwIsoResourceOnce *self,
struct fw_iso_resource_waiter w;
g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_ONCE(self));
- g_return_if_fail(error != NULL && *error == NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
fw_iso_resource_waiter_init(HINOKO_FW_ISO_RESOURCE(self), &w, "allocated", timeout_ms);
@@ -160,7 +160,7 @@ void hinoko_fw_iso_resource_once_deallocate_sync(HinokoFwIsoResourceOnce *self,
struct fw_iso_resource_waiter w;
g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_ONCE(self));
- g_return_if_fail(error != NULL && *error == NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
fw_iso_resource_waiter_init(HINOKO_FW_ISO_RESOURCE(self), &w, "deallocated", timeout_ms);