[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-bugs
Subject:    user/5038: Newlines in cvs_log()
From:       Ray Lai <ray () cyth ! net>
Date:       2006-02-26 17:50:01
Message-ID: 20060226175024.668E1168 () syntax ! cyth ! net
[Download RAW message or body]

>Number:         5038
>Category:       user
>Synopsis:       Newlines in cvs_log()
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 26 18:00:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ray
>Release:        3.9-beta
>Organization:
net
>Environment:
	
	System      : OpenBSD 3.9
	Architecture: OpenBSD.i386
	Machine     : i386
>Description:
There are newlines in the format string passed to cvs_log() when
the comment describing cvs_log() clearly states: ``The <fmt> argument
should not have a terminating newline''

>How-To-Repeat:
	
>Fix:
Index: diff.c
===================================================================
RCS file: /home/ray/openbsd/src/usr.bin/cvs/diff.c,v
retrieving revision 1.79
diff -u -r1.79 diff.c
--- diff.c	30 Jan 2006 17:58:47 -0000	1.79
+++ diff.c	26 Feb 2006 17:46:22 -0000
@@ -591,7 +591,7 @@
 	b1 = rcs_getrev(rf, r1);
 
 	if (b1 == NULL) {
-		cvs_log(LP_ERR, "failed to retrieve revision %s\n",
+		cvs_log(LP_ERR, "failed to retrieve revision %s",
 		    rcsnum_tostr(r1, buf, sizeof(buf)));
 		if (r1 != cf->cf_lrev)
 			rcsnum_free(r1);
@@ -617,7 +617,7 @@
 	} else {
 		struct stat st;
 		if (stat(diff_file, &st) < 0) {
-			cvs_log(LP_ERR, "failed to retrieve revision %s\n",
+			cvs_log(LP_ERR, "failed to retrieve revision %s",
 			    dap->rev2);
 			cvs_buf_free(b1);
 			return (CVS_EX_DATA);
@@ -630,7 +630,7 @@
 	rcs_close(rf);
 
 	if (b2 == NULL) {
-		cvs_log(LP_ERR, "failed to retrieve revision %s\n",
+		cvs_log(LP_ERR, "failed to retrieve revision %s",
 		    dap->rev2);
 		cvs_buf_free(b1);
 		return (CVS_EX_DATA);


>Release-Note:
>Audit-Trail:
>Unformatted:

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic