[bijiben/wip/sadiq/modernize: 3/5] info-set: Don't manually reset struct members
- From: Mohammed Sadiq <pksadiq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben/wip/sadiq/modernize: 3/5] info-set: Don't manually reset struct members
- Date: Fri, 17 Nov 2017 02:15:58 +0000 (UTC)
commit 3f4fba9ebdeddc632e0b2fe0298add9d2b762b95
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Nov 14 19:10:57 2017 +0530
info-set: Don't manually reset struct members
g_slice_new0() sets allocated memory to 0. It is thus redundant
to set them again to 0.
This is a part of effort to clean up codebase and make the code more
maintainable.
https://bugzilla.gnome.org/show_bug.cgi?id=789696
src/libbiji/biji-info-set.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/libbiji/biji-info-set.c b/src/libbiji/biji-info-set.c
index cc97e39..20ed12b 100644
--- a/src/libbiji/biji-info-set.c
+++ b/src/libbiji/biji-info-set.c
@@ -23,17 +23,7 @@
BijiInfoSet *
biji_info_set_new (void)
{
- BijiInfoSet *retval;
-
- retval = g_slice_new0 (BijiInfoSet);
- retval->url = NULL;
- retval->title = NULL;
- retval->content = NULL;
- retval->datasource_urn = NULL;
- retval->tracker_urn = NULL;
- retval->user_data = NULL;
-
- return retval;
+ return g_slice_new0 (BijiInfoSet);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]