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 | f204122c67569a30454ce0b0ffde6ce6869c5b25 (patch) | |
tree | 756ec2796387c829a01884f7aa168322cacaf785 | |
parent | 1b63c76890769775044287b539ae7338881dbc37 (diff) | |
download | libhinoko-f204122c67569a30454ce0b0ffde6ce6869c5b25.tar.gz |
fw_iso_rx_single: 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_rx_single.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fw_iso_rx_single.c b/src/fw_iso_rx_single.c index 7bad45f..e4ff9f8 100644 --- a/src/fw_iso_rx_single.c +++ b/src/fw_iso_rx_single.c @@ -111,7 +111,7 @@ void hinoko_fw_iso_rx_single_allocate(HinokoFwIsoRxSingle *self, HinokoFwIsoRxSinglePrivate *priv; g_return_if_fail(HINOKO_IS_FW_ISO_RX_SINGLE(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); priv = hinoko_fw_iso_rx_single_get_instance_private(self); @@ -153,7 +153,7 @@ void hinoko_fw_iso_rx_single_map_buffer(HinokoFwIsoRxSingle *self, GError **error) { g_return_if_fail(HINOKO_IS_FW_ISO_RX_SINGLE(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); hinoko_fw_iso_ctx_map_buffer(HINOKO_FW_ISO_CTX(self), maximum_bytes_per_payload, @@ -214,7 +214,7 @@ void hinoko_fw_iso_rx_single_start(HinokoFwIsoRxSingle *self, const guint16 *cyc HinokoFwIsoRxSinglePrivate *priv; g_return_if_fail(HINOKO_IS_FW_ISO_RX_SINGLE(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); priv = hinoko_fw_iso_rx_single_get_instance_private(self); @@ -294,7 +294,7 @@ void hinoko_fw_iso_rx_single_get_payload(HinokoFwIsoRxSingle *self, guint index, guint frame_size; g_return_if_fail(HINOKO_IS_FW_ISO_RX_SINGLE(self)); - g_return_if_fail(error != NULL && *error == NULL); + g_return_if_fail(error == NULL || *error == NULL); priv = hinoko_fw_iso_rx_single_get_instance_private(self); |