Replace memset(0) by zero initializations.

Also remove one pointless zero initialization in rangecoder.c.
This commit is contained in:
Diego Biurrun
2011-06-06 14:13:02 +02:00
parent 856c8e0a04
commit a92be9b856
39 changed files with 66 additions and 144 deletions

View File

@@ -3668,7 +3668,7 @@ int ff_url_join(char *str, int size, const char *proto,
int port, const char *fmt, ...)
{
#if CONFIG_NETWORK
struct addrinfo hints, *ai;
struct addrinfo hints = { 0 }, *ai;
#endif
str[0] = '\0';
@@ -3679,7 +3679,6 @@ int ff_url_join(char *str, int size, const char *proto,
#if CONFIG_NETWORK && defined(AF_INET6)
/* Determine if hostname is a numerical IPv6 address,
* properly escape it within [] in that case. */
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
if (!getaddrinfo(hostname, NULL, &hints, &ai)) {
if (ai->ai_family == AF_INET6) {