diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-11 14:46:20 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-11 16:33:47 +0200 |
commit | f8856c71607a0d2612cb5e9b050efd01f8c6e9d4 (patch) | |
tree | 9795221ed1df229699a947ffbab5c4b12d5af5f6 /src/mbim-proxy | |
parent | 00dcb26cd6993104cb2d255487df7e9d754d0e94 (diff) | |
download | libmbim-f8856c71607a0d2612cb5e9b050efd01f8c6e9d4.tar.gz |
mbim-proxy: port to use g_auto() helpers
Diffstat (limited to 'src/mbim-proxy')
-rw-r--r-- | src/mbim-proxy/mbim-proxy.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mbim-proxy/mbim-proxy.c b/src/mbim-proxy/mbim-proxy.c index c9807b3..6af9a45 100644 --- a/src/mbim-proxy/mbim-proxy.c +++ b/src/mbim-proxy/mbim-proxy.c @@ -210,8 +210,8 @@ proxy_n_devices_changed (MbimProxy *_proxy) int main (int argc, char **argv) { - GError *error = NULL; - GOptionContext *context; + g_autoptr(GError) error = NULL; + g_autoptr(GOptionContext) context = NULL; setlocale (LC_ALL, ""); @@ -219,11 +219,9 @@ int main (int argc, char **argv) context = g_option_context_new ("- Proxy for MBIM devices"); g_option_context_add_main_entries (context, main_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { - g_printerr ("error: %s\n", - error->message); + g_printerr ("error: %s\n", error->message); exit (EXIT_FAILURE); } - g_option_context_free (context); if (version_flag) print_version_and_exit (); |