diff --git a/man2/msgop.2 b/man2/msgop.2 index 2546d241e..1a96f8795 100644 --- a/man2/msgop.2 +++ b/man2/msgop.2 @@ -583,7 +583,7 @@ and .BR msgrcv (). The example program is first run with the \fB\-s\fP option to send a -message and then run again with the \fB-r\fP option to receive a +message and then run again with the \fB\-r\fP option to receive a message. The following shell session shows a sample run of the program: @@ -601,8 +601,6 @@ message received: a message at Wed Mar 4 16:25:45 2015 .SS Program source \& .nf -/* msgop.c */ - #include #include #include @@ -642,9 +640,11 @@ send_msg(int qid, int msgtype) msg.mtype = msgtype; time(&t); - snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s", ctime(&t)); + snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s", + ctime(&t)); - if (msgsnd(qid, (void *) &msg, sizeof(msg.mtext), IPC_NOWAIT) == \-1) { + if (msgsnd(qid, (void *) &msg, sizeof(msg.mtext), + IPC_NOWAIT) == \-1) { perror("msgsnd error"); exit(EXIT_FAILURE); }