diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-05-12 09:41:44 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-05-13 10:02:47 +0200 |
commit | e3a3e2b61818dad8c589c4edcb3d373d1b0d8124 (patch) | |
tree | 83fc9d4ed0960afdda419e43177ecd12deb07fa8 | |
parent | f38ec6dfdf0c564ab87f5aa809ad9785bc7e3bcc (diff) | |
download | ostree-e3a3e2b61818dad8c589c4edcb3d373d1b0d8124.tar.gz |
syntax-check: add syntactic rule to prohibit gs_strfreev
and fix an instance.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | maint.mk | 5 | ||||
-rw-r--r-- | src/libostree/ostree-core.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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 f779f89e..88dcf645 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]) |