diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-03 07:57:47 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2022-05-03 08:31:29 +0900 |
commit | 45bbe017db3431f9c0b45123f0e57275b3370060 (patch) | |
tree | 75288997aa7d8a93574038b508202d7c05f40489 | |
parent | c9fcfd0d9db1e83ce80bfa355b7b92d0ccec6f81 (diff) | |
download | libhinoko-45bbe017db3431f9c0b45123f0e57275b3370060.tar.gz |
fw_iso_resource_auto: 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_auto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fw_iso_resource_auto.c b/src/fw_iso_resource_auto.c index 57502b0..67bd7fb 100644 --- a/src/fw_iso_resource_auto.c +++ b/src/fw_iso_resource_auto.c @@ -148,7 +148,7 @@ void hinoko_fw_iso_resource_auto_allocate_async(HinokoFwIsoResourceAuto *self, int i; g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_AUTO(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); priv = hinoko_fw_iso_resource_auto_get_instance_private(self); @@ -194,7 +194,7 @@ void hinoko_fw_iso_resource_auto_deallocate_async(HinokoFwIsoResourceAuto *self, struct fw_cdev_deallocate dealloc = {0}; g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_AUTO(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); priv = hinoko_fw_iso_resource_auto_get_instance_private(self); @@ -240,7 +240,7 @@ void hinoko_fw_iso_resource_auto_allocate_sync(HinokoFwIsoResourceAuto *self, struct fw_iso_resource_waiter w; g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_AUTO(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); @@ -269,7 +269,7 @@ void hinoko_fw_iso_resource_auto_deallocate_sync(HinokoFwIsoResourceAuto *self, struct fw_iso_resource_waiter w; g_return_if_fail(HINOKO_IS_FW_ISO_RESOURCE_AUTO(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); |