diff options
author | Jim Meyering <meyering@redhat.com> | 2008-06-12 21:38:17 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-06-12 21:38:17 +0200 |
commit | 3808eccbbf7086f1289fe391fe861ec1966645d6 (patch) | |
tree | fa8e7efe993feaaf71b61514f6ae38d22219aa5c /src | |
parent | 81d0c8f367c89a52e41bbd89e7c45d2b1ac495f2 (diff) | |
download | coreutils-3808eccbbf7086f1289fe391fe861ec1966645d6.tar.xz |
tweak to conform with syntax policy
Use "<" or "<=" rather than ">" or ">=".
Use "Type const *", rather than "const Type *".
Diffstat (limited to 'src')
-rw-r--r-- | src/comm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/comm.c b/src/comm.c index 9742fb371..2bf876121 100644 --- a/src/comm.c +++ b/src/comm.c @@ -141,7 +141,7 @@ and column three contains lines common to both files.\n\ 2 for a line only in file 2, 3 for a line in both. */ static void -writeline (const struct linebuffer *line, FILE *stream, int class) +writeline (struct linebuffer const *line, FILE *stream, int class) { switch (class) { @@ -185,8 +185,8 @@ writeline (const struct linebuffer *line, FILE *stream, int class) This funtion was copied (nearly) verbatim from `src/join.c'. */ static void -check_order (const struct linebuffer *prev, - const struct linebuffer *current, +check_order (struct linebuffer const *prev, + struct linebuffer const *current, int whatfile) { @@ -206,7 +206,7 @@ check_order (const struct linebuffer *prev, order = memcmp (prev->buffer, current->buffer, len); } - if (order > 0) + if (0 < order) { error ((check_input_order == CHECK_ORDER_ENABLED ? EXIT_FAILURE : 0), @@ -301,15 +301,15 @@ compare_files (char **infiles) else { seen_unpairable = true; - if (order > 0) - writeline (thisline[1], stdout, 2); - else + if (order <= 0) writeline (thisline[0], stdout, 1); + else + writeline (thisline[1], stdout, 2); } /* Step the file the line came from. If the files match, step both files. */ - if (order >= 0) + if (0 <= order) fill_up[1] = true; if (order <= 0) fill_up[0] = true; |