From 0450b43bdbf8d53e9344e764e99a49ed83762f26 Mon Sep 17 00:00:00 2001 From: joris Date: Sat, 10 Dec 2005 20:27:45 +0000 Subject: switch to xmalloc stuff, me and xsa@ agreed on this a long time ago, but we were being held back by jfb. too bad for him. next step is to use fatal() through out the code for unrecoverable errors instead of trying to be all nice and fluffy and reach main() again. ok niallo@ and xsa@ --- usr.bin/cvs/commit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'usr.bin/cvs/commit.c') diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index f09ebb0e092..245725337ee 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.46 2005/07/27 16:42:19 xsa Exp $ */ +/* $OpenBSD: commit.c,v 1.47 2005/12/10 20:27:45 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -88,11 +88,7 @@ cvs_commit_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) cmd->file_flags &= ~CF_RECURSE; break; case 'm': - cvs_msg = strdup(optarg); - if (cvs_msg == NULL) { - cvs_log(LP_ERRNO, "failed to copy message"); - return (CVS_EX_USAGE); - } + cvs_msg = xstrdup(optarg); break; case 'R': cmd->file_flags |= CF_RECURSE; -- cgit v1.2.3-59-g8ed1b