summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-06-10 05:01:37 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-06-10 05:01:37 +0000
commit957d1787f9bc2f98d871edd683475f8763d55936 (patch)
tree122a8478ffd9b35009e7fdf01fcdbfa2e9beb80e /usr.bin/cvs
parent2a1bccc129e04118f40916019a15c3364bf46eec (diff)
We have a cvs_buf_puts implementation now, also use cvs_buf_putc instead
of cvs_buf_append where appropiate. ok joris
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/client.c7
-rw-r--r--usr.bin/cvs/diff_internals.c4
-rw-r--r--usr.bin/cvs/rcs.c4
-rw-r--r--usr.bin/cvs/server.c7
-rw-r--r--usr.bin/cvs/trigger.c12
5 files changed, 15 insertions, 19 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 5be27bd7aaf..2e2d64646e9 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.113 2008/04/24 19:13:56 tobias Exp $ */
+/* $OpenBSD: client.c,v 1.114 2008/06/10 05:01:36 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -140,11 +140,10 @@ client_get_supported_responses(void)
continue;
if (first != 0)
- cvs_buf_append(bp, " ", 1);
+ cvs_buf_putc(bp, ' ');
else
first++;
- cvs_buf_append(bp, cvs_responses[i].name,
- strlen(cvs_responses[i].name));
+ cvs_buf_puts(bp, cvs_responses[i].name);
}
cvs_buf_putc(bp, '\0');
diff --git a/usr.bin/cvs/diff_internals.c b/usr.bin/cvs/diff_internals.c
index 50246055dcb..f703e354fda 100644
--- a/usr.bin/cvs/diff_internals.c
+++ b/usr.bin/cvs/diff_internals.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff_internals.c,v 1.22 2008/05/30 11:06:17 tobias Exp $ */
+/* $OpenBSD: diff_internals.c,v 1.23 2008/06/10 05:01:36 tobias Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -1459,7 +1459,7 @@ diff_output(const char *fmt, ...)
if (i == -1)
fatal("diff_output: could not allocate memory");
if (diffbuf != NULL)
- cvs_buf_append(diffbuf, str, strlen(str));
+ cvs_buf_puts(diffbuf, str);
else
cvs_printf("%s", str);
xfree(str);
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 793e2296845..92ca5fdff62 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.266 2008/06/08 13:36:30 tobias Exp $ */
+/* $OpenBSD: rcs.c,v 1.267 2008/06/10 05:01:36 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -3448,7 +3448,7 @@ rcs_kwexp_line(char *rcsfile, struct rcs_delta *rdp, struct cvs_lines *lines,
cvs_buf_append(tmpbuf, line->l_line,
start - line->l_line);
/* Append keyword. */
- cvs_buf_append(tmpbuf, expbuf, strlen(expbuf));
+ cvs_buf_puts(tmpbuf, expbuf);
/* Point c to end of keyword. */
tlen = cvs_buf_len(tmpbuf) - 1;
/* Append everything after keyword. */
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index 1be77b4b549..f757c28c36f 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.88 2008/05/28 17:12:00 tobias Exp $ */
+/* $OpenBSD: server.c,v 1.89 2008/06/10 05:01:36 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -221,12 +221,11 @@ cvs_server_validreq(char *data)
continue;
if (first != 0)
- cvs_buf_append(bp, " ", 1);
+ cvs_buf_putc(bp, ' ');
else
first++;
- cvs_buf_append(bp, cvs_requests[i].name,
- strlen(cvs_requests[i].name));
+ cvs_buf_puts(bp, cvs_requests[i].name);
}
cvs_buf_putc(bp, '\0');
diff --git a/usr.bin/cvs/trigger.c b/usr.bin/cvs/trigger.c
index 824f1984e11..bcb78b1d401 100644
--- a/usr.bin/cvs/trigger.c
+++ b/usr.bin/cvs/trigger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trigger.c,v 1.9 2008/06/10 04:38:46 tobias Exp $ */
+/* $OpenBSD: trigger.c,v 1.10 2008/06/10 05:01:36 tobias Exp $ */
/*
* Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
* Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
@@ -71,7 +71,7 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
if (quote)
cvs_buf_putc(buf, '"');
if (oldstyle) {
- cvs_buf_append(buf, repo, strlen(repo));
+ cvs_buf_puts(buf, repo);
cvs_buf_putc(buf, ' ');
}
@@ -82,16 +82,14 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
* check like this, add only uses loginfo for directories anyway
*/
if (cvs_cmdop == CVS_OP_ADD) {
- cvs_buf_append(buf, "- New directory",
- strlen("- New directory"));
+ cvs_buf_puts(buf, "- New directory");
if (quote)
cvs_buf_putc(buf, '"');
return (0);
}
if (cvs_cmdop == CVS_OP_IMPORT) {
- cvs_buf_append(buf, "- Imported sources",
- strlen("- Imported sources"));
+ cvs_buf_puts(buf, "- Imported sources");
if (quote)
cvs_buf_putc(buf, '"');
return (0);
@@ -155,7 +153,7 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
}
if (val != NULL)
- cvs_buf_append(buf, val, strlen(val));
+ cvs_buf_puts(buf, val);
if (*(++p) != '\0')
cvs_buf_putc(buf, ',');