]> git.street.me.uk Git - andy/viking.git/commitdiff
[QA] Prefer g_strdup() over strdup(). Also gives clean cppcheck 1.57 run.
authorRob Norris <rw_norris@hotmail.com>
Sun, 20 Jan 2013 12:51:53 +0000 (12:51 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sun, 20 Jan 2013 12:51:53 +0000 (12:51 +0000)
src/vikwindow.c

index 2476d4093b391e51f95dcc00a7236c96aff0b31e..0ca52b09c5a0b41c293f7407a17015fdccbe21fe 100644 (file)
@@ -2372,7 +2372,7 @@ static gboolean save_file_as ( GtkAction *a, VikWindow *vw )
     gtk_window_set_destroy_with_parent ( GTK_WINDOW(vw->save_dia), TRUE );
   }
   // Auto append / replace extension with '.vik' to the suggested file name as it's going to be a Viking File
-  gchar* auto_save_name = strdup ( window_get_filename ( vw ) );
+  gchar* auto_save_name = g_strdup ( window_get_filename ( vw ) );
   if ( ! check_file_ext ( auto_save_name, ".vik" ) )
     auto_save_name = g_strconcat ( auto_save_name, ".vik", NULL );