summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-11 01:55:06 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-11 01:55:06 +0000
commit10fbe20d5ed44270bb538cd9e603ecdb924a9edb (patch)
tree0425a069c217814d8f20731b8cb64d9379e05189
parent7b4fc3168796adde3a0cf87caa67123e9380372c (diff)
style ferry comes around
-rw-r--r--usr.bin/cvs/log.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/usr.bin/cvs/log.c b/usr.bin/cvs/log.c
index f83a06b50e6..30b757c8318 100644
--- a/usr.bin/cvs/log.c
+++ b/usr.bin/cvs/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.43 2008/04/24 19:13:56 tobias Exp $ */
+/* $OpenBSD: log.c,v 1.44 2008/06/11 01:55:05 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -129,36 +129,38 @@ cvs_printf(const char *fmt, ...)
va_start(vap, fmt);
- ret = vasprintf(&nstr, fmt, vap);
- if (ret == -1)
- fatal("cvs_printf: could not allocate memory");
- for (dp = nstr; *dp != '\0';) {
- sp = strchr(dp, '\n');
- if (sp == NULL)
- for (sp = dp; *sp != '\0'; sp++)
- ;
-
- if (cvs_server_active && send_m) {
- send_m = 0;
- putc('M', stdout);
- putc(' ', stdout);
- }
-
- if (dp != nstr && dp != sp &&
- !strncmp(dp, LOG_REVSEP, sp - dp))
- putc('>', stdout);
-
- fwrite(dp, sizeof(char), (size_t)(sp - dp), stdout);
-
- if (*sp != '\n')
- break;
-
- putc('\n', stdout);
- send_m = 1;
- dp = sp + 1;
+ ret = vasprintf(&nstr, fmt, vap);
+ if (ret == -1)
+ fatal("cvs_printf: could not allocate memory");
+
+ for (dp = nstr; *dp != '\0';) {
+ sp = strchr(dp, '\n');
+ if (sp == NULL)
+ for (sp = dp; *sp != '\0'; sp++)
+ ;
+
+ if (cvs_server_active && send_m) {
+ send_m = 0;
+ putc('M', stdout);
+ putc(' ', stdout);
}
- xfree(nstr);
+ if (dp != nstr && dp != sp &&
+ !strncmp(dp, LOG_REVSEP, sp - dp))
+ putc('>', stdout);
+
+ fwrite(dp, sizeof(char), (size_t)(sp - dp), stdout);
+
+ if (*sp != '\n')
+ break;
+
+ putc('\n', stdout);
+ send_m = 1;
+ dp = sp + 1;
+ }
+
+ xfree(nstr);
va_end(vap);
+
return (ret);
}