diff options
author | Rich Salz <rsalz@akamai.com> | 2015-12-16 16:12:24 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-12-16 16:14:49 -0500 |
commit | 7644a9aef8932ed4d1c3f25ed776c997702982be (patch) | |
tree | d8f1e7fca20ad12683a1e2e52c92b6999ada23a6 /crypto/bio | |
parent | e4cf866322a4549c55153f9f135f9dadf4d3fc31 (diff) |
Rename some BUF_xxx to OPENSSL_xxx
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
Add #define's for the old names.
Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/b_dump.c | 14 | ||||
-rw-r--r-- | crypto/bio/b_sock.c | 2 | ||||
-rw-r--r-- | crypto/bio/bss_acpt.c | 2 | ||||
-rw-r--r-- | crypto/bio/bss_conn.c | 10 | ||||
-rw-r--r-- | crypto/bio/bss_file.c | 10 |
5 files changed, 19 insertions, 19 deletions
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c index 55792b9e30..3d005e3ff9 100644 --- a/crypto/bio/b_dump.c +++ b/crypto/bio/b_dump.c @@ -104,20 +104,20 @@ int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u), if ((rows * dump_width) < len) rows++; for (i = 0; i < rows; i++) { - BUF_strlcpy(buf, str, sizeof buf); + OPENSSL_strlcpy(buf, str, sizeof buf); BIO_snprintf(tmp, sizeof tmp, "%04x - ", i * dump_width); - BUF_strlcat(buf, tmp, sizeof buf); + OPENSSL_strlcat(buf, tmp, sizeof buf); for (j = 0; j < dump_width; j++) { if (((i * dump_width) + j) >= len) { - BUF_strlcat(buf, " ", sizeof buf); + OPENSSL_strlcat(buf, " ", sizeof buf); } else { ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; BIO_snprintf(tmp, sizeof tmp, "%02x%c", ch, j == 7 ? '-' : ' '); - BUF_strlcat(buf, tmp, sizeof buf); + OPENSSL_strlcat(buf, tmp, sizeof buf); } } - BUF_strlcat(buf, " ", sizeof buf); + OPENSSL_strlcat(buf, " ", sizeof buf); for (j = 0; j < dump_width; j++) { if (((i * dump_width) + j) >= len) break; @@ -131,9 +131,9 @@ int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u), ? os_toebcdic[ch] : '.'); #endif - BUF_strlcat(buf, tmp, sizeof buf); + OPENSSL_strlcat(buf, tmp, sizeof buf); } - BUF_strlcat(buf, "\n", sizeof buf); + OPENSSL_strlcat(buf, "\n", sizeof buf); /* * if this is the last call then update the ddt_dump thing so that we * will move the selection point in the debug window diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index e536eda2a6..cc090724e8 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -402,7 +402,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) if (BIO_sock_init() != 1) return ((int)INVALID_SOCKET); - if ((str = BUF_strdup(host)) == NULL) + if ((str = OPENSSL_strdup(host)) == NULL) return ((int)INVALID_SOCKET); h = p = NULL; diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index c549c87c3c..f65ee1a6ef 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -350,7 +350,7 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) if (num == 0) { b->init = 1; OPENSSL_free(data->param_addr); - data->param_addr = BUF_strdup(ptr); + data->param_addr = OPENSSL_strdup(ptr); } else if (num == 1) { data->accept_nbio = (ptr != NULL); } else if (num == 2) { diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index ba009aa6b0..929656c882 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -149,7 +149,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) break; } OPENSSL_free(c->param_port); - c->param_port = BUF_strdup(p); + c->param_port = OPENSSL_strdup(p); } } @@ -455,10 +455,10 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) b->init = 1; if (num == 0) { OPENSSL_free(data->param_hostname); - data->param_hostname = BUF_strdup(ptr); + data->param_hostname = OPENSSL_strdup(ptr); } else if (num == 1) { OPENSSL_free(data->param_port); - data->param_port = BUF_strdup(ptr); + data->param_port = OPENSSL_strdup(ptr); } else if (num == 2) { char buf[16]; unsigned char *p = ptr; @@ -466,14 +466,14 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) BIO_snprintf(buf, sizeof buf, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); OPENSSL_free(data->param_hostname); - data->param_hostname = BUF_strdup(buf); + data->param_hostname = OPENSSL_strdup(buf); memcpy(&(data->ip[0]), ptr, 4); } else if (num == 3) { char buf[DECIMAL_SIZE(int) + 1]; BIO_snprintf(buf, sizeof buf, "%d", *(int *)ptr); OPENSSL_free(data->param_port); - data->param_port = BUF_strdup(buf); + data->param_port = OPENSSL_strdup(buf); data->port = *(int *)ptr; } } diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index 7692ee293c..c09a9a95f6 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -367,15 +367,15 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) b->shutdown = (int)num & BIO_CLOSE; if (num & BIO_FP_APPEND) { if (num & BIO_FP_READ) - BUF_strlcpy(p, "a+", sizeof p); + OPENSSL_strlcpy(p, "a+", sizeof p); else - BUF_strlcpy(p, "a", sizeof p); + OPENSSL_strlcpy(p, "a", sizeof p); } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE)) - BUF_strlcpy(p, "r+", sizeof p); + OPENSSL_strlcpy(p, "r+", sizeof p); else if (num & BIO_FP_WRITE) - BUF_strlcpy(p, "w", sizeof p); + OPENSSL_strlcpy(p, "w", sizeof p); else if (num & BIO_FP_READ) - BUF_strlcpy(p, "r", sizeof p); + OPENSSL_strlcpy(p, "r", sizeof p); else { BIOerr(BIO_F_FILE_CTRL, BIO_R_BAD_FOPEN_MODE); ret = 0; |