about summary refs log tree commit diff
path: root/pwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwait.c')
-rw-r--r--pwait.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/pwait.c b/pwait.c
index 8cf7983..1cfc133 100644
--- a/pwait.c
+++ b/pwait.c
@@ -90,12 +90,12 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
+#include <linux/cn_proc.h>
 #include <linux/connector.h>
 #include <linux/netlink.h>
-#include <linux/cn_proc.h>
 
-#define max(x,y) ((y)<(x)?(x):(y))
-#define min(x,y) ((y)>(x)?(x):(y))
+#define max(x, y) ((y) < (x) ? (x) : (y))
+#define min(x, y) ((y) > (x) ? (x) : (y))
 
 #define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof (struct cn_msg) + \
 				       sizeof (enum proc_cn_mcast_op)))
@@ -161,7 +161,7 @@ main(int argc, char *argv[])
 		case 'v': verbose = 1; break;
 		default: goto usage;
 		}
-	
+
 	argc -= optind;
 	argv += optind;
 
@@ -207,7 +207,7 @@ usage:
 	}
 	nl_hdr = (struct nlmsghdr *)buff;
 	cn_hdr = (struct cn_msg *)NLMSG_DATA(nl_hdr);
-	mcop_msg = (enum proc_cn_mcast_op*)&cn_hdr->data[0];
+	mcop_msg = (enum proc_cn_mcast_op *)&cn_hdr->data[0];
 
 	memset(buff, 0, sizeof buff);
 	*mcop_msg = PROC_CN_MCAST_LISTEN;
@@ -252,14 +252,14 @@ usage:
 			if (nlh->nlmsg_type == NLMSG_ERROR ||
 			    nlh->nlmsg_type == NLMSG_OVERRUN)
 				break;
-			
+
 			ev = (struct proc_event *)
-			    ((struct cn_msg *) NLMSG_DATA(nlh))->data;
-			
+			    ((struct cn_msg *)NLMSG_DATA(nlh))->data;
+
 			if (ev->what == PROC_EVENT_EXIT) {
 				int status = ev->event_data.exit.exit_code;
 				pid_t pid = ev->event_data.exit.process_pid;
-				
+
 				seen = 0;
 				for (n = 0; n < argc; n++)
 					if (pids[n] == pid) {
@@ -273,12 +273,12 @@ usage:
 							rc = 111;
 					}
 			}
-			
+
 			if (nlh->nlmsg_type == NLMSG_DONE)
 				break;
 			nlh = NLMSG_NEXT(nlh, recv_len);
 		}
-		
+
 		quit = 1;
 		for (n = 0; n < argc; n++)
 			if (pids[n] != 0)