Skip to content

Commit cb319c3

Browse files
Kjetil Barvikgitster
authored andcommitted
symlinks.c: small style cleanup
Add {}-braces around an else-part, where the if-part already has {}-braces. And, also remove some unnecessary "return;"-statements at the end of "void foo()"-functions. Signed-off-by: Kjetil Barvik <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26c117d commit cb319c3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

symlinks.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ void invalidate_lstat_cache(const char *name, int len)
196196
cache.path[previous_slash] = '\0';
197197
cache.len = previous_slash;
198198
cache.flags = FL_DIR;
199-
} else
199+
} else {
200200
reset_lstat_cache();
201+
}
201202
}
202203
}
203204

@@ -263,7 +264,6 @@ static void do_remove_scheduled_dirs(int new_len)
263264
removal.path[removal.len] != '/');
264265
}
265266
removal.len = new_len;
266-
return;
267267
}
268268

269269
void schedule_dir_for_removal(const char *name, int len)
@@ -296,11 +296,9 @@ void schedule_dir_for_removal(const char *name, int len)
296296
last_slash - match_len);
297297
removal.len = last_slash;
298298
}
299-
return;
300299
}
301300

302301
void remove_scheduled_dirs(void)
303302
{
304303
do_remove_scheduled_dirs(0);
305-
return;
306304
}

0 commit comments

Comments
 (0)