diff options
| -rw-r--r-- | coreutils/comm.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/coreutils/comm.c b/coreutils/comm.c index 772dafc4d..8b9380175 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c | |||
| @@ -4,21 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2005 by Robert Sullivan <cogito.ergo.cogito@gmail.com> | 5 | * Copyright (C) 2005 by Robert Sullivan <cogito.ergo.cogito@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
| 20 | * 02111-1307 USA | ||
| 21 | * | ||
| 22 | */ | 8 | */ |
| 23 | 9 | ||
| 24 | #include <stdio.h> | 10 | #include <stdio.h> |
| @@ -75,16 +61,16 @@ static void cmp_files(char **infiles) | |||
| 75 | fgets(thisline[i], LINE_LEN, streams[i]); | 61 | fgets(thisline[i], LINE_LEN, streams[i]); |
| 76 | } | 62 | } |
| 77 | 63 | ||
| 78 | while (thisline[0] || thisline[1]) { | 64 | while (*thisline[0] || *thisline[1]) { |
| 79 | int order = 0; | 65 | int order = 0; |
| 80 | 66 | ||
| 81 | i = 0; | 67 | i = 0; |
| 82 | if (feof(streams[0])) i |= BB_EOF_0; | 68 | if (feof(streams[0])) i |= BB_EOF_0; |
| 83 | if (feof(streams[1])) i |= BB_EOF_1; | 69 | if (feof(streams[1])) i |= BB_EOF_1; |
| 84 | 70 | ||
| 85 | if (!thisline[0]) | 71 | if (!*thisline[0]) |
| 86 | order = 1; | 72 | order = 1; |
| 87 | else if (!thisline[1]) | 73 | else if (!*thisline[1]) |
| 88 | order = -1; | 74 | order = -1; |
| 89 | else { | 75 | else { |
| 90 | int tl0_len, tl1_len; | 76 | int tl0_len, tl1_len; |
