[ostree] syntax-check: add syntactic rule to prohibit gs_strfreev
- From: Giuseppe Scrivano <gscrivano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] syntax-check: add syntactic rule to prohibit gs_strfreev
- Date: Wed, 13 May 2015 08:05:20 +0000 (UTC)
commit e3a3e2b61818dad8c589c4edcb3d373d1b0d8124
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Tue May 12 09:41:44 2015 +0200
syntax-check: add syntactic rule to prohibit gs_strfreev
and fix an instance.
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
maint.mk | 5 +++++
src/libostree/ostree-core.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/maint.mk b/maint.mk
index 9b77357..8cda1ad 100644
--- a/maint.mk
+++ b/maint.mk
@@ -1032,6 +1032,11 @@ sc_const_long_option:
halt='add "const" to the above declarations' \
$(_sc_search_regexp)
+sc_prohibit_gs_strfreev:
+ @prohibit='\bgs_strfreev\b' \
+ halt="do not use gs_strfreev; use g_autoptr instead" \
+ $(_sc_search_regexp)
+
sc_prohibit_gs_unref:
@prohibit='\bgs_unref_(keyfile|variant*|ptrarray|hashtable|bytes|object)\b' \
halt="do not use gs_unref_*; use g_autoptr instead" \
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index f779f89..88dcf64 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1501,7 +1501,7 @@ _ostree_parse_delta_name (const char *delta_name,
char **out_from,
char **out_to)
{
- gs_strfreev char **parts = g_strsplit (delta_name, "-", 2);
+ g_auto(GStrv) parts = g_strsplit (delta_name, "-", 2);
*out_from = *out_to = NULL;
if (parts[0] && parts[1])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]