diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-04-01 20:11:26 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-04-01 20:11:26 +0000 |
commit | 32714ab5c5017603973169ae9b2838c40a04fc19 (patch) | |
tree | 429b4339c65cb245fa0de76ea14ee7ef78eccedf | |
parent | b819b6faeded35903b13ddaa909620d21c0c1238 (diff) |
fix some bugs that lint discovered for us.
ok niallo@
-rw-r--r-- | usr.bin/cvs/admin.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/commit.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 8 | ||||
-rw-r--r-- | usr.bin/cvs/diff.c | 4 |
4 files changed, 11 insertions, 16 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index a5f750749f9..35a3af24df1 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.31 2006/03/24 13:34:27 ray Exp $ */ +/* $OpenBSD: admin.c,v 1.32 2006/04/01 20:11:25 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -338,7 +338,6 @@ cvs_admin_remote(CVSFILE *cf, void *arg) static int cvs_admin_local(CVSFILE *cf, void *arg) { - int ret; char fpath[MAXPATHLEN], rcspath[MAXPATHLEN]; RCSFILE *rf; @@ -367,9 +366,9 @@ cvs_admin_local(CVSFILE *cf, void *arg) cvs_printf("RCS file: %s\n", rcspath); if (!RCS_KWEXP_INVAL(kflag)) - ret = rcs_kwexp_set(rf, kflag); + rcs_kwexp_set(rf, kflag); if (lkmode != RCS_LOCK_INVAL) - ret = rcs_lock_setmode(rf, lkmode); + rcs_lock_setmode(rf, lkmode); rcs_close(rf); diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index e1a8970fe69..757fa80e5ec 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.52 2006/03/16 09:06:19 xsa Exp $ */ +/* $OpenBSD: commit.c,v 1.53 2006/04/01 20:11:25 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -221,10 +221,9 @@ cvs_commit_prepare(CVSFILE *cf, void *arg) int cvs_commit_remote(CVSFILE *cf, void *arg) { - char *repo, fpath[MAXPATHLEN]; + char fpath[MAXPATHLEN]; struct cvsroot *root; - repo = NULL; root = CVS_DIR_ROOT(cf); if (cf->cf_type == DT_DIR) { @@ -235,9 +234,6 @@ cvs_commit_remote(CVSFILE *cf, void *arg) cvs_file_getpath(cf, fpath, sizeof(fpath)); - if (cf->cf_parent != NULL) - repo = cf->cf_parent->cf_repo; - if ((cf->cf_cvstat == CVS_FST_ADDED) || (cf->cf_cvstat == CVS_FST_MODIFIED) || (cf->cf_cvstat == CVS_FST_REMOVED)) { diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 36676d999fd..057e0fd4100 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.102 2006/03/15 19:59:36 niallo Exp $ */ +/* $OpenBSD: cvs.h,v 1.103 2006/04/01 20:11:25 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -153,8 +153,8 @@ struct cvs_cmd { - int cmd_op; - int cmd_req; + u_int cmd_op; + u_int cmd_req; char cmd_name[CVS_CMD_MAXNAMELEN]; char cmd_alias[CVS_CMD_MAXALIAS][CVS_CMD_MAXNAMELEN]; char cmd_descr[CVS_CMD_MAXDESCRLEN]; @@ -315,8 +315,6 @@ typedef struct cvs_histfile { } CVSHIST; - -extern char *cvs_req_modulename; extern char *cvs_repo_base; extern char *cvs_command; extern char *cvs_editor; diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 98d37169df2..37ed4f0a481 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.85 2006/03/28 07:17:16 ray Exp $ */ +/* $OpenBSD: diff.c,v 1.86 2006/04/01 20:11:25 joris Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -134,6 +134,8 @@ #include "log.h" #include "proto.h" +#include "xmalloc.h" + struct cand { int x; int y; |