summaryrefslogtreecommitdiff
path: root/libmatemixer
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-12-09 12:05:16 +0100
committerlukefromdc <[email protected]>2019-12-10 18:39:02 +0000
commit004f668b29549a4b4c041f6d27b15898a9d7acc5 (patch)
tree35e5e5936f1089e427fc0156ed0a679f7c8de36b /libmatemixer
parent8138877b8f12881deec7e40aad9ebbf39e8826a8 (diff)
downloadlibmatemixer-004f668b29549a4b4c041f6d27b15898a9d7acc5.tar.bz2
libmatemixer-004f668b29549a4b4c041f6d27b15898a9d7acc5.tar.xz
Fix cppcheck [syntaxError] warnings
Diffstat (limited to 'libmatemixer')
-rw-r--r--libmatemixer/matemixer-backend-module.c2
-rw-r--r--libmatemixer/matemixer-backend.c4
-rw-r--r--libmatemixer/matemixer-context.c8
-rw-r--r--libmatemixer/matemixer-device.c4
-rw-r--r--libmatemixer/matemixer-stream-toggle.c8
-rw-r--r--libmatemixer/matemixer-stream.c4
-rw-r--r--libmatemixer/matemixer.c2
7 files changed, 16 insertions, 16 deletions
diff --git a/libmatemixer/matemixer-backend-module.c b/libmatemixer/matemixer-backend-module.c
index ce88f6d..3f419c5 100644
--- a/libmatemixer/matemixer-backend-module.c
+++ b/libmatemixer/matemixer-backend-module.c
@@ -257,7 +257,7 @@ backend_module_load (GTypeModule *type_module)
/* Make sure get_info() returns something, so we can avoid checking it
* in other parts of the library */
- if G_UNLIKELY (module->priv->get_info () == NULL) {
+ if (G_UNLIKELY (module->priv->get_info () == NULL)) {
g_critical ("Backend module %s does not provide module information",
module->priv->path);
diff --git a/libmatemixer/matemixer-backend.c b/libmatemixer/matemixer-backend.c
index d6e78d2..db33b06 100644
--- a/libmatemixer/matemixer-backend.c
+++ b/libmatemixer/matemixer-backend.c
@@ -529,7 +529,7 @@ device_added (MateMixerBackend *backend, const gchar *name)
MateMixerDevice *device;
device = mate_mixer_backend_get_device (backend, name);
- if G_UNLIKELY (device == NULL) {
+ if (G_UNLIKELY (device == NULL)) {
g_warn_if_reached ();
return;
}
@@ -558,7 +558,7 @@ device_removed (MateMixerBackend *backend, const gchar *name)
MateMixerDevice *device;
device = g_hash_table_lookup (backend->priv->devices, name);
- if G_UNLIKELY (device == NULL) {
+ if (G_UNLIKELY (device == NULL)) {
g_warn_if_reached ();
return;
}
diff --git a/libmatemixer/matemixer-context.c b/libmatemixer/matemixer-context.c
index 5cf2926..fd727d7 100644
--- a/libmatemixer/matemixer-context.c
+++ b/libmatemixer/matemixer-context.c
@@ -866,8 +866,8 @@ mate_mixer_context_open (MateMixerContext *context)
state = mate_mixer_backend_get_state (context->priv->backend);
- if G_UNLIKELY (state != MATE_MIXER_STATE_READY &&
- state != MATE_MIXER_STATE_CONNECTING) {
+ if (G_UNLIKELY (state != MATE_MIXER_STATE_READY &&
+ state != MATE_MIXER_STATE_CONNECTING)) {
/* This would be a backend bug */
g_warn_if_reached ();
@@ -1377,8 +1377,8 @@ try_next_backend (MateMixerContext *context)
state = mate_mixer_backend_get_state (context->priv->backend);
- if G_UNLIKELY (state != MATE_MIXER_STATE_READY &&
- state != MATE_MIXER_STATE_CONNECTING) {
+ if (G_UNLIKELY (state != MATE_MIXER_STATE_READY &&
+ state != MATE_MIXER_STATE_CONNECTING)) {
/* This would be a backend bug */
g_warn_if_reached ();
diff --git a/libmatemixer/matemixer-device.c b/libmatemixer/matemixer-device.c
index a53aa98..6ef3e34 100644
--- a/libmatemixer/matemixer-device.c
+++ b/libmatemixer/matemixer-device.c
@@ -427,7 +427,7 @@ mate_mixer_device_list_streams (MateMixerDevice *device)
klass = MATE_MIXER_DEVICE_GET_CLASS (device);
- if G_LIKELY (klass->list_streams != NULL)
+ if (G_LIKELY (klass->list_streams != NULL))
return klass->list_streams (device);
return NULL;
@@ -461,7 +461,7 @@ mate_mixer_device_list_switches (MateMixerDevice *device)
klass = MATE_MIXER_DEVICE_GET_CLASS (device);
- if G_LIKELY (klass->list_switches != NULL)
+ if (G_LIKELY (klass->list_switches != NULL))
return klass->list_switches (device);
return NULL;
diff --git a/libmatemixer/matemixer-stream-toggle.c b/libmatemixer/matemixer-stream-toggle.c
index 6a948d6..af79c7a 100644
--- a/libmatemixer/matemixer-stream-toggle.c
+++ b/libmatemixer/matemixer-stream-toggle.c
@@ -220,7 +220,7 @@ mate_mixer_stream_toggle_get_state (MateMixerStreamToggle *toggle)
g_return_val_if_fail (MATE_MIXER_IS_STREAM_TOGGLE (toggle), FALSE);
active = mate_mixer_switch_get_active_option (MATE_MIXER_SWITCH (toggle));
- if G_UNLIKELY (active == NULL)
+ if (G_UNLIKELY (active == NULL))
return FALSE;
if (active == toggle->priv->on)
@@ -273,7 +273,7 @@ mate_mixer_stream_toggle_set_state (MateMixerStreamToggle *toggle, gboolean stat
else
active = toggle->priv->off;
- if G_UNLIKELY (active == NULL)
+ if (G_UNLIKELY (active == NULL))
return FALSE;
return mate_mixer_switch_set_active_option (MATE_MIXER_SWITCH (toggle), active);
@@ -307,10 +307,10 @@ mate_mixer_stream_toggle_list_options (MateMixerSwitch *swtch)
toggle = MATE_MIXER_STREAM_TOGGLE (swtch);
if (toggle->priv->options == NULL) {
- if G_LIKELY (toggle->priv->off != NULL)
+ if (G_LIKELY (toggle->priv->off != NULL))
toggle->priv->options = g_list_prepend (toggle->priv->options,
toggle->priv->off);
- if G_LIKELY (toggle->priv->on != NULL)
+ if (G_LIKELY (toggle->priv->on != NULL))
toggle->priv->options = g_list_prepend (toggle->priv->options,
toggle->priv->on);
}
diff --git a/libmatemixer/matemixer-stream.c b/libmatemixer/matemixer-stream.c
index 591e286..ca7bc81 100644
--- a/libmatemixer/matemixer-stream.c
+++ b/libmatemixer/matemixer-stream.c
@@ -414,7 +414,7 @@ mate_mixer_stream_list_controls (MateMixerStream *stream)
klass = MATE_MIXER_STREAM_GET_CLASS (stream);
- if G_LIKELY (klass->list_controls != NULL)
+ if (G_LIKELY (klass->list_controls != NULL))
return klass->list_controls (stream);
return NULL;
@@ -433,7 +433,7 @@ mate_mixer_stream_list_switches (MateMixerStream *stream)
klass = MATE_MIXER_STREAM_GET_CLASS (stream);
- if G_LIKELY (klass->list_switches != NULL)
+ if (G_LIKELY (klass->list_switches != NULL))
return klass->list_switches (stream);
return NULL;
diff --git a/libmatemixer/matemixer.c b/libmatemixer/matemixer.c
index 1c09c7b..e32569b 100644
--- a/libmatemixer/matemixer.c
+++ b/libmatemixer/matemixer.c
@@ -149,7 +149,7 @@ load_modules (void)
if (loaded == TRUE)
return;
- if G_LIKELY (g_module_supported () == TRUE) {
+ if (G_LIKELY (g_module_supported () == TRUE)) {
GDir *dir;
GError *error = NULL;