summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorderaadt <>2015-04-23 06:11:19 +0000
committerderaadt <>2015-04-23 06:11:19 +0000
commit61630c9631a2bd70570f348c1a65eefb0a864d9d (patch)
tree7e75d9906dfaab0bc5ae13b91ca810ca4b773ada /src
parent17f8db1522ab539822120e4317746e3256089123 (diff)
downloadopenbsd-61630c9631a2bd70570f348c1a65eefb0a864d9d.tar.gz
openbsd-61630c9631a2bd70570f348c1a65eefb0a864d9d.tar.bz2
openbsd-61630c9631a2bd70570f348c1a65eefb0a864d9d.zip
Do not need to buf[0] = 0 before strlcpy(buf, ...
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bio/b_dump.c3
-rw-r--r--src/lib/libssl/src/crypto/bio/b_dump.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c
index 0943e9006d..0214addc8b 100644
--- a/src/lib/libcrypto/bio/b_dump.c
+++ b/src/lib/libcrypto/bio/b_dump.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: b_dump.c,v 1.20 2014/11/11 19:26:12 miod Exp $ */ 1/* $OpenBSD: b_dump.c,v 1.21 2015/04/23 06:11:19 deraadt Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -107,7 +107,6 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
107 if ((rows * dump_width) < len) 107 if ((rows * dump_width) < len)
108 rows++; 108 rows++;
109 for (i = 0; i < rows; i++) { 109 for (i = 0; i < rows; i++) {
110 buf[0] = '\0'; /* start with empty string */
111 strlcpy(buf, str, sizeof buf); 110 strlcpy(buf, str, sizeof buf);
112 snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); 111 snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
113 strlcat(buf, tmp, sizeof buf); 112 strlcat(buf, tmp, sizeof buf);
diff --git a/src/lib/libssl/src/crypto/bio/b_dump.c b/src/lib/libssl/src/crypto/bio/b_dump.c
index 0943e9006d..0214addc8b 100644
--- a/src/lib/libssl/src/crypto/bio/b_dump.c
+++ b/src/lib/libssl/src/crypto/bio/b_dump.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: b_dump.c,v 1.20 2014/11/11 19:26:12 miod Exp $ */ 1/* $OpenBSD: b_dump.c,v 1.21 2015/04/23 06:11:19 deraadt Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -107,7 +107,6 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
107 if ((rows * dump_width) < len) 107 if ((rows * dump_width) < len)
108 rows++; 108 rows++;
109 for (i = 0; i < rows; i++) { 109 for (i = 0; i < rows; i++) {
110 buf[0] = '\0'; /* start with empty string */
111 strlcpy(buf, str, sizeof buf); 110 strlcpy(buf, str, sizeof buf);
112 snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); 111 snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
113 strlcat(buf, tmp, sizeof buf); 112 strlcat(buf, tmp, sizeof buf);