[gnome-builder] snippets: no need to strdup, const is expected



commit 5daa347676d0260dafa4ac7abff4e33ab2095333
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 12 18:44:49 2016 -0700

    snippets: no need to strdup, const is expected

 libide/snippets/ide-source-snippet-parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/snippets/ide-source-snippet-parser.c b/libide/snippets/ide-source-snippet-parser.c
index 1cf5996..56dd812 100644
--- a/libide/snippets/ide-source-snippet-parser.c
+++ b/libide/snippets/ide-source-snippet-parser.c
@@ -83,7 +83,7 @@ ide_source_snippet_parser_store (IdeSourceSnippetParser *parser)
   ide_source_snippet_parser_flush_chunk (parser);
   for (scope_iter = parser->scope; scope_iter; scope_iter = scope_iter->next)
     {
-      snippet = ide_source_snippet_new (parser->cur_name, g_strdup(scope_iter->data));
+      snippet = ide_source_snippet_new (parser->cur_name, scope_iter->data);
       ide_source_snippet_set_description (snippet, parser->cur_desc);
       ide_source_snippet_set_snippet_text (snippet, parser->snippet_text->str);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]