- commentary typo and superfluous whitespace removal in weird messages.
This commit is contained in:
parent
38fc692e38
commit
0c013f5fc7
@ -209,7 +209,7 @@ static void circ_message(const char *msg)
|
|||||||
* "tail" are actually offsets from the beginning of the buffer.
|
* "tail" are actually offsets from the beginning of the buffer.
|
||||||
*
|
*
|
||||||
* Note: This algorithm uses Linux IPC mechanism w/ shared memory and semaphores to provide
|
* Note: This algorithm uses Linux IPC mechanism w/ shared memory and semaphores to provide
|
||||||
* a threasafe way of handling shared memory operations.
|
* a threadsafe way of handling shared memory operations.
|
||||||
*/
|
*/
|
||||||
if ((buf->tail + l) < buf->size) {
|
if ((buf->tail + l) < buf->size) {
|
||||||
/* before we append the message we need to check the HEAD so that we won't
|
/* before we append the message we need to check the HEAD so that we won't
|
||||||
@ -236,7 +236,7 @@ static void circ_message(const char *msg)
|
|||||||
/* Note: HEAD is only used to "retrieve" messages, it's not used
|
/* Note: HEAD is only used to "retrieve" messages, it's not used
|
||||||
when writing messages into our buffer */
|
when writing messages into our buffer */
|
||||||
} else { /* show an error message to know we messed up? */
|
} else { /* show an error message to know we messed up? */
|
||||||
printf("Weird! Can't find the terminator token??? \n");
|
printf("Weird! Can't find the terminator token?\n");
|
||||||
buf->head = 0;
|
buf->head = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ static void circ_message(const char *msg)
|
|||||||
buf->tail = k + 1;
|
buf->tail = k + 1;
|
||||||
} else {
|
} else {
|
||||||
printf
|
printf
|
||||||
("Weird! Can't find the terminator token from the beginning??? \n");
|
("Weird! Can't find the terminator token from the beginning?\n");
|
||||||
buf->head = buf->tail = 0; /* reset buffer, since it's probably corrupted */
|
buf->head = buf->tail = 0; /* reset buffer, since it's probably corrupted */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user