remove unnecessary typecasting of malloc()

This commit is contained in:
Yang Tse
2008-09-06 05:29:05 +00:00
parent 5d2ace75a3
commit f33bd94c05
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -675,7 +675,7 @@ DhcpNameServer
{
if (bytes)
{
line = (char *)malloc(bytes+1);
line = malloc(bytes+1);
if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type,
(unsigned char *)line, &bytes) ==
ERROR_SUCCESS)
@@ -952,7 +952,7 @@ static int init_by_defaults(ares_channel channel)
size_t len = 64;
int res;
hostname = (char *)malloc(len);
hostname = malloc(len);
if(!hostname) {
rc = ARES_ENOMEM;
goto error;
+1 -1
View File
@@ -77,7 +77,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
/* Examine each answer resource record (RR) in turn. */
hostname = NULL;
aliases = (char **) malloc(8 * sizeof(char *));
aliases = malloc(8 * sizeof(char *));
if (!aliases)
{
free(ptrname);