From baa19c7238a75ff88de0c1c0783599ceb3bbd14c Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Wed, 20 Feb 2008 17:29:29 +0000 Subject: With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore. OK joris@ --- usr.bin/cvs/commit.c | 4 +--- usr.bin/cvs/file.c | 5 +---- usr.bin/cvs/import.c | 9 ++++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index b3e84f1306b..9de98313e80 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.129 2008/02/11 20:33:11 tobias Exp $ */ +/* $OpenBSD: commit.c,v 1.130 2008/02/20 17:29:28 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria @@ -441,8 +441,6 @@ cvs_commit_local(struct cvs_file *cf) if (cf->file_status == FILE_REMOVED) { b = rcs_rev_getbuf(cf->file_rcs, crev, 0); - if (b == NULL) - fatal("cvs_commit_local: failed to get crev"); } else if (onbranch == 1) { b = commit_diff(cf, crev, 1); } else { diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index f33d4d5ec49..5e9f7cba0f2 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.223 2008/02/20 09:16:32 joris Exp $ */ +/* $OpenBSD: file.c,v 1.224 2008/02/20 17:29:28 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -750,9 +750,6 @@ cvs_file_classify(struct cvs_file *cf, const char *tag) if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL && cf->file_rcsrev != NULL && !RCSNUM_ISBRANCH(cf->file_rcsrev)) { b1 = rcs_rev_getbuf(cf->file_rcs, cf->file_rcsrev, 0); - if (b1 == NULL) - fatal("failed to get HEAD revision for comparison"); - b2 = cvs_buf_load_fd(cf->fd); if (cvs_buf_differ(b1, b2)) diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index 93059218fd4..83047694576 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.83 2008/02/11 20:33:11 tobias Exp $ */ +/* $OpenBSD: import.c,v 1.84 2008/02/20 17:29:28 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -292,14 +292,13 @@ import_update(struct cvs_file *cf) cvs_log(LP_TRACE, "import_update(%s)", cf->file_path); if ((rev = rcs_translate_tag(import_branch, cf->file_rcs)) == NULL) - fatal("import_update: could not translate tag `%s'", import_branch); + fatal("import_update: could not translate tag `%s'", + import_branch); if ((brev = rcsnum_parse(import_branch)) == NULL) fatal("import_update: rcsnum_parse failed"); - if ((b1 = rcs_rev_getbuf(cf->file_rcs, rev, RCS_KWEXP_NONE)) == NULL) - fatal("import_update: failed to grab revision"); - + b1 = rcs_rev_getbuf(cf->file_rcs, rev, RCS_KWEXP_NONE); b2 = cvs_buf_load_fd(cf->fd); ret = cvs_buf_differ(b1, b2); -- cgit v1.2.3