git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] drop redundant semicolon in empty while

From
Jeff King <peff@peff.net>
Date
Oct 24, 2013, 08:42 UTC
Message-ID
<20131024084217.GA4748@sigill.intra.peff.net>

The extra semi-colon is harmless, since we really do want the while loop to do nothing. But it does trigger a warning from clang.

Signed-off-by: Jeff King <peff@peff.net>
---
 date.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/date.c b/date.c
index 29f1540..83b4166 100644
--- a/date.c
+++ b/date.c
@@ -907,7 +907,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
 	const char *end = date;
 	int i;
 
-	while (isalpha(*++end));
+	while (isalpha(*++end))
 		;
 
 	for (i = 0; i < 12; i++) {
-- 
1.8.4.1.898.g8bf8a41.dirty
Message 1 of 1 in “drop redundant semicolon in empty while”
  1. drop redundant semicolon in empty whileJeff King, Oct 24, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.