{"thread":{"id":"19722","subject":"[PATCH] symlinks.c: small style cleanup","startedAt":"2009-06-07T11:33:05Z","lastAt":"2009-06-07T21:25:47Z","messageCount":4,"participants":["Kjetil Barvik","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"115698","messageId":"1244374385-5253-1-git-send-email-barvik@broadpark.no","threadId":"19722","inReplyTo":null,"subject":"[PATCH] symlinks.c: small style cleanup","fromName":"Kjetil Barvik","fromEmail":"barvik@broadpark.no","sentAt":"2009-06-07T11:33:05Z","receivedAt":"2009-06-07T11:33:05Z","isPatch":true,"sender":{"key":"barvik@broadpark.no","avatar":null},"body":"Add {}-braces around an else-part, where the if-part already has\n{}-braces.\n\nAnd, also remove some unnecessary \"return;\"-statements at the end of\n\"void foo()\"-functions.\n\nSigned-off-by: Kjetil Barvik <barvik@broadpark.no>\n---\n symlinks.c |    6 ++----\n 1 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/symlinks.c b/symlinks.c\nindex 1d6b35b..8dcd632 100644\n--- a/symlinks.c\n+++ b/symlinks.c\n@@ -196,8 +196,9 @@ void invalidate_lstat_cache(const char *name, int len)\n \t\t\tcache.path[previous_slash] = '\\0';\n \t\t\tcache.len = previous_slash;\n \t\t\tcache.flags = FL_DIR;\n-\t\t} else\n+\t\t} else {\n \t\t\treset_lstat_cache();\n+\t\t}\n \t}\n }\n \n@@ -263,7 +264,6 @@ static void do_remove_scheduled_dirs(int new_len)\n \t\t\t removal.path[removal.len] != '/');\n \t}\n \tremoval.len = new_len;\n-\treturn;\n }\n \n void schedule_dir_for_removal(const char *name, int len)\n@@ -296,11 +296,9 @@ void schedule_dir_for_removal(const char *name, int len)\n \t\t       last_slash - match_len);\n \t\tremoval.len = last_slash;\n \t}\n-\treturn;\n }\n \n void remove_scheduled_dirs(void)\n {\n \tdo_remove_scheduled_dirs(0);\n-\treturn;\n }\n-- \n1.6.3.2.277.gd10543\n"},{"id":"115706","messageId":"alpine.DEB.1.00.0906071616060.26154@pacific.mpi-cbg.de","threadId":"19722","inReplyTo":"1244374385-5253-1-git-send-email-barvik@broadpark.no","subject":"Re: [PATCH] symlinks.c: small style cleanup","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-06-07T14:16:47Z","receivedAt":"2009-06-07T14:16:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 7 Jun 2009, Kjetil Barvik wrote:\n\n> Add {}-braces around an else-part, where the if-part already has\n> {}-braces.\n\nThis is the wrong way round.  We prefer _not_ to add unnecessary braces, \nbut do tolerate them from time to time.\n\nHth,\nDscho\n"},{"id":"115711","messageId":"7veitwatvy.fsf@alter.siamese.dyndns.org","threadId":"19722","inReplyTo":"alpine.DEB.1.00.0906071616060.26154@pacific.mpi-cbg.de","subject":"Re: [PATCH] symlinks.c: small style cleanup","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-07T16:30:41Z","receivedAt":"2009-06-07T16:30:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Sun, 7 Jun 2009, Kjetil Barvik wrote:\n>\n>> Add {}-braces around an else-part, where the if-part already has\n>> {}-braces.\n>\n> This is the wrong way round.  We prefer _not_ to add unnecessary braces, \n> but do tolerate them from time to time.\n\nI am at fault not spelling this out so far, but we prefer to match the\nkernel style of having {} around a single-statment \"else\" body when the\ncorresponding \"if\" side needs one (or vice versa).\n"},{"id":"115736","messageId":"86fxebwxb8.fsf@broadpark.no","threadId":"19722","inReplyTo":"7veitwatvy.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] symlinks.c: small style cleanup","fromName":"Kjetil Barvik","fromEmail":"barvik@broadpark.no","sentAt":"2009-06-07T21:25:47Z","receivedAt":"2009-06-07T21:25:47Z","isPatch":true,"sender":{"key":"barvik@broadpark.no","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n>> On Sun, 7 Jun 2009, Kjetil Barvik wrote:\n>>\n>>> Add {}-braces around an else-part, where the if-part already has\n>>> {}-braces.\n>>\n>> This is the wrong way round.  We prefer _not_ to add unnecessary braces, \n>> but do tolerate them from time to time.\n>\n> I am at fault not spelling this out so far, but we prefer to match the\n> kernel style of having {} around a single-statment \"else\" body when the\n> corresponding \"if\" side needs one (or vice versa).\n\n  OK!\n\n  I can also say that it looks better in my eyes to do it like this, so,\n  Junio, please use this version of the patch, and forget about v2 of\n  the patch posted some time later.\n\n  -- kjetil\n"}]}