diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-24 13:44:16 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-24 13:44:16 +0300 |
commit | bd4494363230705c3efaa13f3c94a73fadab88e4 (patch) | |
tree | 23bf1dbd912e5130cc4c608bf772f0bc7b8c8bbf /audio/a2dp.c | |
parent | e32c8dcd38b8e2282559a325c59fd6b7fa187d2f (diff) |
Use g_clear_error(&err) instead of g_error_free(err); err = NULL
Diffstat (limited to 'audio/a2dp.c')
-rw-r--r-- | audio/a2dp.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c index 49312a71..8c38a90b 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -1071,8 +1071,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) if (err) { debug("audio.conf: %s", err->message); - g_error_free(err); - err = NULL; + g_clear_error(&err); } else { if (strstr(str, "Sink")) source = FALSE; @@ -1084,8 +1083,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) str = g_key_file_get_string(config, "A2DP", "SBCSources", &err); if (err) { debug("audio.conf: %s", err->message); - g_error_free(err); - err = NULL; + g_clear_error(&err); } else { sbc_srcs = atoi(str); g_free(str); @@ -1094,8 +1092,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) str = g_key_file_get_string(config, "A2DP", "MPEG12Sources", &err); if (err) { debug("audio.conf: %s", err->message); - g_error_free(err); - err = NULL; + g_clear_error(&err); } else { mpeg12_srcs = atoi(str); g_free(str); @@ -1104,8 +1101,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) str = g_key_file_get_string(config, "A2DP", "SBCSinks", &err); if (err) { debug("audio.conf: %s", err->message); - g_error_free(err); - err = NULL; + g_clear_error(&err); } else { sbc_sinks = atoi(str); g_free(str); @@ -1114,8 +1110,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) str = g_key_file_get_string(config, "A2DP", "MPEG12Sinks", &err); if (err) { debug("audio.conf: %s", err->message); - g_error_free(err); - err = NULL; + g_clear_error(&err); } else { mpeg12_sinks = atoi(str); g_free(str); |