From c7bda1ce659294d6e22c06e087f6f265983c7578 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 15 Mar 2004 08:29:22 +0000 Subject: Remove trailing whitespace. Update copyright to include 2004. --- sysklogd/logread.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sysklogd/logread.c') diff --git a/sysklogd/logread.c b/sysklogd/logread.c index 207e78b57..70d1db631 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -62,13 +62,13 @@ static void interrupted(int sig); */ static inline void sem_up(int semid) { - if ( semop(semid, SMrup, 1) == -1 ) + if ( semop(semid, SMrup, 1) == -1 ) error_exit("semop[SMrup]"); } /* * sem_down - down()'s a semaphore - */ + */ static inline void sem_down(int semid) { if ( semop(semid, SMrdn, 2) == -1 ) @@ -79,7 +79,7 @@ extern int logread_main(int argc, char **argv) { int i; int follow=0; - + if (argc == 2 && strcmp(argv[1],"-f")==0) { follow = 1; } else { @@ -87,16 +87,16 @@ extern int logread_main(int argc, char **argv) if (argc > 1) bb_show_usage(); } - + // handle intrrupt signal if (setjmp(jmp_env)) goto output_end; - + // attempt to redefine ^C signal signal(SIGINT, interrupted); - + if ( (log_shmid = shmget(KEY_ID, 0, 0)) == -1) error_exit("Can't find circular buffer"); - + // Attach shared memory to our char* if ( (buf = shmat(log_shmid, NULL, SHM_RDONLY)) == NULL) error_exit("Can't get access to circular buffer from syslogd"); @@ -113,7 +113,7 @@ extern int logread_main(int argc, char **argv) int log_len,j; #endif - sem_down(log_semid); + sem_down(log_semid); //printf("head: %i tail: %i size: %i\n",buf->head,buf->tail,buf->size); if (buf->head == buf->tail || i==buf->tail) { @@ -125,8 +125,8 @@ extern int logread_main(int argc, char **argv) printf("\n"); } } - - // Read Memory + + // Read Memory #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING log_len = buf->tail - i; if (log_len < 0) @@ -165,10 +165,10 @@ extern int logread_main(int argc, char **argv) } while (follow); output_end: - if (log_shmid != -1) + if (log_shmid != -1) shmdt(buf); - - return EXIT_SUCCESS; + + return EXIT_SUCCESS; } static void interrupted(int sig){ @@ -179,7 +179,7 @@ static void interrupted(int sig){ static void error_exit(const char *str){ perror(str); //release all acquired resources - if (log_shmid != -1) + if (log_shmid != -1) shmdt(buf); exit(1); -- cgit v1.2.3