[geany/geany-plugins] 34f58a: utils: Small code style cleanup
Colomban Wendling
git-noreply at xxxxx
Sun Oct 15 21:28:08 UTC 2017
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 15 Oct 2017 21:28:08 UTC
Commit: 34f58a5679cc0be2cef500961f9af0a55519e944
https://github.com/geany/geany-plugins/commit/34f58a5679cc0be2cef500961f9af0a55519e944
Log Message:
-----------
utils: Small code style cleanup
Modified Paths:
--------------
utils/src/filelist.c
Modified: utils/src/filelist.c
15 lines changed, 6 insertions(+), 9 deletions(-)
===================================================================
@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-/*
- * Code for the WB_PROJECT structure.
- */
#include <glib.h>
#include <glib/gstdio.h>
@@ -38,7 +35,8 @@ typedef struct
GSList *ignored_dirs_list;
GSList *ignored_file_list;
GHashTable *visited_paths;
-}SCAN_DIR_PARAMS;
+}
+ScanDirParams;
/** Get precompiled patterns.
@@ -90,7 +88,7 @@ static gboolean filelist_patterns_match(GSList *patterns, const gchar *str)
/* Scan directory searchdir. Input and output parameters come from/go to params. */
-static void filelist_scan_directory_int(const gchar *searchdir, SCAN_DIR_PARAMS *params)
+static void filelist_scan_directory_int(const gchar *searchdir, ScanDirParams *params)
{
GDir *dir;
gchar *locale_path = utils_get_locale_from_utf8(searchdir);
@@ -133,7 +131,8 @@ static void filelist_scan_directory_int(const gchar *searchdir, SCAN_DIR_PARAMS
}
else if (g_file_test(locale_filename, G_FILE_TEST_IS_REGULAR))
{
- if (filelist_patterns_match(params->file_patterns, utf8_name) && !filelist_patterns_match(params->ignored_file_list, utf8_name))
+ if (filelist_patterns_match(params->file_patterns, utf8_name) && !
+ filelist_patterns_match(params->ignored_file_list, utf8_name))
{
params->file_count++;
params->filelist = g_slist_prepend(params->filelist, g_strdup(utf8_filename));
@@ -175,9 +174,7 @@ static void filelist_scan_directory_int(const gchar *searchdir, SCAN_DIR_PARAMS
GSList *gp_filelist_scan_directory(guint *files, guint *folders, const gchar *searchdir, gchar **file_patterns,
gchar **ignored_dirs_patterns, gchar **ignored_file_patterns)
{
- SCAN_DIR_PARAMS params;
-
- memset(¶ms, 0, sizeof(params));
+ ScanDirParams params = { 0 };
if (!file_patterns || !file_patterns[0])
{
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list