diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-05-25 03:45:26 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-05-25 03:45:26 +0000 |
commit | 88a3062b005daa704b195b0b6940ca95a249f53a (patch) | |
tree | 6db7a1daf68d0db0d6e39d8ba913851476cb707f /usr.bin/ftp/fetch.c | |
parent | a7a0b4f14a80a22a8d63ed288eaf2ae35efc824d (diff) |
Don't recalculate string length, just use return value from vasprintf.
While here, remove pointless void pointer cast.
OK otto@, beck@
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r-- | usr.bin/ftp/fetch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 4cde2b14a45..d9871aea329 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.63 2006/05/25 03:43:36 ray Exp $ */ +/* $OpenBSD: fetch.c,v 1.64 2006/05/25 03:45:25 ray Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: fetch.c,v 1.63 2006/05/25 03:43:36 ray Exp $"; +static const char rcsid[] = "$OpenBSD: fetch.c,v 1.64 2006/05/25 03:45:25 ray Exp $"; #endif /* not lint and not SMALL */ /* @@ -1087,7 +1087,7 @@ SSL_vprintf(SSL *ssl, const char *fmt, va_list ap) if ((ret = vasprintf(&string, fmt, ap)) == -1) return ret; - ret = SSL_write(ssl, (void *)string, (int)strlen(string)); + ret = SSL_write(ssl, string, ret); free(string); return ret; } |