diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-04-16 20:54:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-04-16 20:54:19 +0000 |
commit | 00d10a94f32459f5f2c42c374ec61585dfffbcbd (patch) | |
tree | cb6450825653fc565826be8838d424c5b374662e /miscutils/less.c | |
parent | f284c767e5e8d138589f760d03dc2c681f326b25 (diff) | |
download | busybox-w32-00d10a94f32459f5f2c42c374ec61585dfffbcbd.tar.gz busybox-w32-00d10a94f32459f5f2c42c374ec61585dfffbcbd.tar.bz2 busybox-w32-00d10a94f32459f5f2c42c374ec61585dfffbcbd.zip |
uncuddle if statements
Diffstat (limited to 'miscutils/less.c')
-rw-r--r-- | miscutils/less.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index a64fc500e..6b0cab526 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -215,7 +215,7 @@ static void data_readlines(void) | |||
215 | for (i = 0; (feof(fp)==0) && (i <= MAXLINES); i++) { | 215 | for (i = 0; (feof(fp)==0) && (i <= MAXLINES); i++) { |
216 | strcpy(current_line, ""); | 216 | strcpy(current_line, ""); |
217 | fgets(current_line, 256, fp); | 217 | fgets(current_line, 256, fp); |
218 | if(fp != stdin) | 218 | if (fp != stdin) |
219 | bb_xferror(fp, filename); | 219 | bb_xferror(fp, filename); |
220 | flines = xrealloc(flines, (i+1) * sizeof(char *)); | 220 | flines = xrealloc(flines, (i+1) * sizeof(char *)); |
221 | flines[i] = bb_xstrdup(current_line); | 221 | flines[i] = bb_xstrdup(current_line); |
@@ -229,7 +229,7 @@ static void data_readlines(void) | |||
229 | 229 | ||
230 | fclose(fp); | 230 | fclose(fp); |
231 | 231 | ||
232 | if(inp == NULL) | 232 | if (inp == NULL) |
233 | inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin; | 233 | inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin; |
234 | 234 | ||
235 | if (flags & FLAG_N) | 235 | if (flags & FLAG_N) |
@@ -358,7 +358,7 @@ static void buffer_init(void) | |||
358 | { | 358 | { |
359 | int i; | 359 | int i; |
360 | 360 | ||
361 | if(buffer == NULL) { | 361 | if (buffer == NULL) { |
362 | /* malloc the number of lines needed for the buffer */ | 362 | /* malloc the number of lines needed for the buffer */ |
363 | buffer = xrealloc(buffer, height * sizeof(char *)); | 363 | buffer = xrealloc(buffer, height * sizeof(char *)); |
364 | } else { | 364 | } else { |
@@ -677,8 +677,8 @@ static void regex_process(void) | |||
677 | uncomp_regex[0] = 0; | 677 | uncomp_regex[0] = 0; |
678 | fgets(uncomp_regex, sizeof(uncomp_regex), stdin); | 678 | fgets(uncomp_regex, sizeof(uncomp_regex), stdin); |
679 | i = strlen(uncomp_regex); | 679 | i = strlen(uncomp_regex); |
680 | if(i > 0) { | 680 | if (i > 0) { |
681 | if(uncomp_regex[i-1] == '\n') | 681 | if (uncomp_regex[i-1] == '\n') |
682 | uncomp_regex[i-1] = '\0'; | 682 | uncomp_regex[i-1] = '\0'; |
683 | else | 683 | else |
684 | while((i = getchar()) != '\n' && i != EOF); | 684 | while((i = getchar()) != '\n' && i != EOF); |