[gnome-photos] print-notification: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] print-notification: Use g_auto*
- Date: Tue, 24 Oct 2017 18:22:06 +0000 (UTC)
commit de621228c6a1a74abdf593ce7fc183709b3752e3
Author: Umang Jain <mailumangjain gmail com>
Date: Sun Oct 8 09:34:17 2017 +0530
print-notification: Use g_auto*
https://bugzilla.gnome.org/show_bug.cgi?id=788174
src/photos-print-notification.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/photos-print-notification.c b/src/photos-print-notification.c
index a3d2f3a..cf7bf84 100644
--- a/src/photos-print-notification.c
+++ b/src/photos-print-notification.c
@@ -66,8 +66,8 @@ static void
photos_print_notification_status_changed (PhotosPrintNotification *self)
{
const gchar *status_str;
- gchar *job_name = NULL;
- gchar *status = NULL;
+ g_autofree gchar *job_name = NULL;
+ g_autofree gchar *status = NULL;
status_str = gtk_print_operation_get_status_string (self->print_op);
g_object_get (self->print_op, "job-name", &job_name, NULL);
@@ -76,9 +76,6 @@ photos_print_notification_status_changed (PhotosPrintNotification *self)
if (gtk_print_operation_is_finished (self->print_op))
gtk_widget_destroy (GTK_WIDGET (self));
-
- g_free (job_name);
- g_free (status);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]