[balsa] abook-completion: Simplify
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] abook-completion: Simplify
- Date: Tue, 4 Jun 2019 17:10:40 +0000 (UTC)
commit 62db441ae2e18f3f51fe3d28d6fe8fa0260bec7d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Jun 4 12:42:04 2019 -0400
abook-completion: Simplify
We assign to both members of the completion-data struct, so there is no
need to initially clear it; use the return value of g_object_ref().
libbalsa/abook-completion.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libbalsa/abook-completion.c b/libbalsa/abook-completion.c
index 3d63592f0..bf9d7a5fd 100644
--- a/libbalsa/abook-completion.c
+++ b/libbalsa/abook-completion.c
@@ -44,10 +44,9 @@ completion_data_new(InternetAddress * ia, const gchar * nick_name)
#endif
CompletionData *ret;
- ret = g_new0(CompletionData, 1);
+ ret = g_new(CompletionData, 1);
- g_object_ref(ia);
- ret->ia = ia;
+ ret->ia = g_object_ref(ia);
string = g_string_new(nick_name);
if (string->len > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]