diff options
author | Jim Meyering <jim@meyering.net> | 1999-01-02 05:54:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-01-02 05:54:07 +0000 |
commit | 2bb9d3c528922b763461125a3be5035c107cc279 (patch) | |
tree | cc3f6b7378aca7321d4e03e19f1b77ad43188886 /src | |
parent | b311b41561ba51860000e15f1fa3eb9b24449839 (diff) | |
download | coreutils-2bb9d3c528922b763461125a3be5035c107cc279.tar.xz |
Move inclusion of assert.h to follow that of stdio.h.
Some losing systems require this.
Use STREQ macro instead of strcmp in a few places.
Diffstat (limited to 'src')
-rw-r--r-- | src/tsort.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tsort.c b/src/tsort.c index d47cdb064..90f57a7c1 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -25,9 +25,9 @@ # include <config.h> #endif +#include <stdio.h> #include <assert.h> #include <getopt.h> -#include <stdio.h> #include "long-options.h" #include "system.h" @@ -167,7 +167,7 @@ search_item (struct item *root, const char *str) p->right = q; /* A6. Adjust balance factors. */ - assert (strcmp (str, s->str)); + assert (!STREQ (str, s->str)); if (strcmp (str, s->str) < 0) { r = p = s->left; @@ -181,7 +181,7 @@ search_item (struct item *root, const char *str) while (p != q) { - assert (strcmp (str, p->str)); + assert (!STREQ (str, p->str)); if (strcmp (str, p->str) < 0) { p->balance = -1; @@ -275,7 +275,7 @@ record_relation (struct item *j, struct item *k) { struct successor *p; - if (strcmp (j->str, k->str)) + if (!STREQ (j->str, k->str)) { k->count++; p = xmalloc (sizeof (struct successor)); @@ -381,7 +381,7 @@ tsort (const char *file) while (1) { long int len; - + /* T2. Next Relation. */ len = readtoken (fp, DELIM, sizeof (DELIM) - 1, &tokenbuffer); if (len < 0) |