summaryrefslogtreecommitdiff
path: root/print/LPRng-core/patches/patch-src_common_plp__snprintf.c
blob: c9c2cb63809358ad79fff261b67464926326c214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-src_common_plp__snprintf.c,v 1.1 2011/11/25 22:15:18 joerg Exp $

--- src/common/plp_snprintf.c.orig	2004-09-24 20:19:58.000000000 +0000
+++ src/common/plp_snprintf.c
@@ -933,7 +933,7 @@
 	}
 	convert[2*i] = 0;
 
-	place = safestrlen(convert);
+	place = strlen(convert);
 	padlen = len - place;
 	if( padlen < 0 ) padlen = 0;
 	if( ljust ) padlen = -padlen;
@@ -991,13 +991,13 @@
 	if( ljust ) mystrcat(formatstr, "-" ); /* 1 */
 	if( zpad ) mystrcat(formatstr, "0" );	/* 1 */
 	if( len >= 0 ){
-		sprintf( formatstr+safestrlen(formatstr), "%d", len ); /* 3 */
+		sprintf( formatstr+strlen(formatstr), "%d", len ); /* 3 */
 	}
 	if( precision >= 0 ){
-		sprintf( formatstr+safestrlen(formatstr), ".%d", precision ); /* 3 */
+		sprintf( formatstr+strlen(formatstr), ".%d", precision ); /* 3 */
 	}
 	/* format string will be at most 10 chars long ... */
-	sprintf( formatstr+safestrlen(formatstr), "%c", fmt );
+	sprintf( formatstr+strlen(formatstr), "%c", fmt );
 	/* this is easier than trying to do the portable dtostr */
 	/* fprintf(stderr,"format string '%s'\n", formatstr); */
 	sprintf( convert, formatstr, value );