about summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/chat.c b/chat.c
index 258dde2..b7bf91b 100644
--- a/chat.c
+++ b/chat.c
@@ -88,8 +88,7 @@ static void execRead(void) {
 	if (len < 0) err(EX_IOERR, "read");
 	if (!len) return;
 	buf[len] = '\0';
-	char *ptr = buf;
-	while (ptr) {
+	for (char *ptr = buf; ptr;) {
 		char *line = strsep(&ptr, "\n");
 		if (line[0]) command(execID, line);
 	}
@@ -101,8 +100,7 @@ static void utilRead(void) {
 	if (len < 0) err(EX_IOERR, "read");
 	if (!len) return;
 	buf[len] = '\0';
-	char *ptr = buf;
-	while (ptr) {
+	for (char *ptr = buf; ptr;) {
 		char *line = strsep(&ptr, "\n");
 		if (line[0]) uiFormat(Network, Warm, NULL, "%s", line);
 	}
@@ -287,8 +285,7 @@ int main(int argc, char *argv[]) {
 
 		if (signals[SIGCHLD]) {
 			signals[SIGCHLD] = 0;
-			int status;
-			while (0 < waitpid(-1, &status, WNOHANG)) {
+			for (int status; 0 < waitpid(-1, &status, WNOHANG);) {
 				if (WIFEXITED(status) && WEXITSTATUS(status)) {
 					uiFormat(
 						Network, Warm, NULL,
&follow=1'>Always skip most significant bits in gfxxJune McEnroe 2018-02-05Set title in gfcocoaJune McEnroe 2018-02-05Double-buffer gfb frontendJune McEnroe 2018-02-05Rewrite gfxx bit handlingJune McEnroe 2018-02-05Add flip option to gfxxJune McEnroe 2018-02-05Remove gfxx reverse optionJune McEnroe 2018-02-04Fix gfxx draw stop conditionJune McEnroe 2018-02-04Reuse CGColorSpace and CGDataProvider in gfcocoaJune McEnroe 2018-02-04Mark mac target phonyJune McEnroe 2018-02-04Set up Makefile for gfxx-cocoa or gfxx-fbJune McEnroe 2018-02-04Avoid doing excessive work in gfxxJune McEnroe 2018-02-04Handle window resizing in gfcocoaJune McEnroe 2018-02-04Set cinoptionsJune McEnroe 2018-02-04Tweak colorscheme moreJune McEnroe 2018-02-04Color MatchParen DarkYellowJune McEnroe 2018-02-04Add palette sampling to gfxxJune McEnroe 2018-02-04Add 4-bit RGB to gfxxJune McEnroe 2018-02-04Add Quit menu item to gfcocoaJune McEnroe 2018-02-04Switch back to sane Objective-C styleJune McEnroe 2018-02-04Quit gfcocoa when window closesJune McEnroe 2018-02-03Apparently this is how people write Objective-CJune McEnroe