Some little cleanups from Larry Doolittle
This commit is contained in:
parent
5b5db38a7d
commit
afdde3e356
2
dmesg.c
2
dmesg.c
@ -86,7 +86,7 @@ int dmesg_main(int argc, char **argv)
|
|||||||
|
|
||||||
lastc = '\n';
|
lastc = '\n';
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') {
|
if (lastc == '\n' && buf[i] == '<') {
|
||||||
i++;
|
i++;
|
||||||
while (buf[i] >= '0' && buf[i] <= '9')
|
while (buf[i] >= '0' && buf[i] <= '9')
|
||||||
i++;
|
i++;
|
||||||
|
2
logger.c
2
logger.c
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
/* We have to do this since the header file defines static
|
/* We have to do this since the header file defines static
|
||||||
* structues. Argh.... bad libc, bad, bad...
|
* structures. Argh.... bad libc, bad, bad...
|
||||||
*/
|
*/
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
typedef struct _code {
|
typedef struct _code {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
/* We have to do this since the header file defines static
|
/* We have to do this since the header file defines static
|
||||||
* structues. Argh.... bad libc, bad, bad...
|
* structures. Argh.... bad libc, bad, bad...
|
||||||
*/
|
*/
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
typedef struct _code {
|
typedef struct _code {
|
||||||
|
@ -86,7 +86,7 @@ int dmesg_main(int argc, char **argv)
|
|||||||
|
|
||||||
lastc = '\n';
|
lastc = '\n';
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') {
|
if (lastc == '\n' && buf[i] == '<') {
|
||||||
i++;
|
i++;
|
||||||
while (buf[i] >= '0' && buf[i] <= '9')
|
while (buf[i] >= '0' && buf[i] <= '9')
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user