summaryrefslogtreecommitdiff
path: root/usr.bin/tsort
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2017-05-20 09:31:20 +0000
committerMarc Espie <espie@cvs.openbsd.org>2017-05-20 09:31:20 +0000
commit826c6dc7f0964f593dbe568248560e6940dd2371 (patch)
tree29af42f524f10a742c2b2827803386249dfa2f12 /usr.bin/tsort
parentcf1aec4f615eec696b3716b68ceb6871af16b621 (diff)
reorg node struct so it's packed tighter (found by clang actually)
mark usage __dead okay millert@
Diffstat (limited to 'usr.bin/tsort')
-rw-r--r--usr.bin/tsort/tsort.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c
index 08258135bfd..5caa733f430 100644
--- a/usr.bin/tsort/tsort.c
+++ b/usr.bin/tsort/tsort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tsort.c,v 1.35 2016/01/05 16:10:57 espie Exp $ */
+/* $OpenBSD: tsort.c,v 1.36 2017/05/20 09:31:19 espie Exp $ */
/* ex:ts=8 sw=4:
*
* Copyright (c) 1999-2004 Marc Espie <espie@openbsd.org>
@@ -92,15 +92,15 @@ struct node {
unsigned int refs; /* Number of arcs left, coming into this node.
* Note that nodes with a null count can't
* be part of cycles. */
- struct link *arcs; /* List of forward arcs. */
-
unsigned int order; /* Order of nodes according to a hint file. */
+ struct link *arcs; /* List of forward arcs. */
+
/* Cycle detection algorithms build a free path of nodes. */
struct node *from; /* Previous node in the current path. */
-
- unsigned int mark; /* Mark processed nodes in cycle discovery. */
struct link *traverse; /* Next link to traverse when backtracking. */
+ unsigned int mark; /* Mark processed nodes in cycle discovery. */
+
char k[1]; /* Name of this node. */
};
@@ -113,7 +113,7 @@ struct array {
static void nodes_init(struct ohash *);
static struct node *node_lookup(struct ohash *, const char *, const char *);
-static void usage(void);
+static __dead void usage(void);
static struct node *new_node(const char *, const char *);
static unsigned int read_pairs(FILE *, struct ohash *, int,