Skip to content

Commit

Permalink
Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Sep 27, 2022
1 parent 327f0eb commit 5b20fb1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ static gboolean fn_unescape_cb(const GMatchInfo *match_info, GString *result, g

static char *fn_unescape(char *fn) {
static GRegex *regex = NULL;
if (!regex) {
if (!regex)
regex = compile_pattern("\\\\x([0-9a-f]{0,2})");
}
GError *error;
char *ret = g_regex_replace_eval(regex, fn, -1, 0, 0, fn_unescape_cb, NULL, &error);
if (!ret)
Expand Down Expand Up @@ -495,11 +494,10 @@ static void add_clean_dir(char *dir) {
const char *entry;
while ( (entry = g_dir_read_name(d)) ) {
char *path = g_strdup_printf("%s/%s", dir, entry);
if (is_excepted(path)) {
if (is_excepted(path))
free(path);
} else {
else
g_hash_table_insert(CLEAN, path, path);
}
}
g_dir_close(d);
}
Expand Down Expand Up @@ -1445,7 +1443,6 @@ static void master(char *master_path, char *target) {
}
}


int main(int argc, char **argv) {

char *argv0 = argv[0];
Expand Down

0 comments on commit 5b20fb1

Please sign in to comment.