diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-03-24 13:34:28 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-03-24 13:34:28 +0000 |
commit | 41913ef29fbfeb6b3ba30ac53350ad9ca1edbb28 (patch) | |
tree | 6069986b659019c22b0312cef6f3c327310ebe9a /usr.bin/cvs/checkout.c | |
parent | 1f6bc076e36bb3fccad1c8ca90ac8df8b0a0db31 (diff) |
Remove unused variables, better integer types, prevent fallthroughs.
Found by lint.
Compare char * variables against NULL for consistency and add
parentheses around complicated comparisons, suggested by xsa@.
OK xsa@
Diffstat (limited to 'usr.bin/cvs/checkout.c')
-rw-r--r-- | usr.bin/cvs/checkout.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index c2f43325b1e..fff1e30859b 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.50 2006/01/31 13:55:20 xsa Exp $ */ +/* $OpenBSD: checkout.c,v 1.51 2006/03/24 13:34:27 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -92,7 +92,6 @@ static int cvs_checkout_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) { int ch; - RCSNUM *rcs; date = tag = koptstr = tgtdir = rcsid = NULL; @@ -164,11 +163,11 @@ cvs_checkout_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) /* `export' command exceptions */ if (cvs_cmdop == CVS_OP_EXPORT) { - if (!tag && !date) + if ((tag == NULL) && (date == NULL)) fatal("must specify a tag or date"); /* we don't want numerical revisions here */ - if (tag && (rcs = rcsnum_parse(tag)) != NULL) + if ((tag != NULL) && (rcsnum_parse(tag) != NULL)) fatal("tag `%s' must be a symbolic tag", tag); } |