summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-11-24 16:54:59 +0300
committerKonstantin Osipov <kostja@sun.com>2009-11-24 16:54:59 +0300
commit4cff617c2541279a53b92acbd4e4d8716dc54873 (patch)
tree887f74eb880e4d9ff8b76ff93b221f7e6ec7fbe8 /sql/udf_example.c
parent26cd9abe4fcc058004ad8e656ff5b6713c0118f4 (diff)
downloadmariadb-git-4cff617c2541279a53b92acbd4e4d8716dc54873.tar.gz
Backport of:
---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
Diffstat (limited to 'sql/udf_example.c')
-rw-r--r--sql/udf_example.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 4e3dd82c467..73256bb5529 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -767,14 +767,14 @@ char *lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
return 0;
}
#else
- VOID(pthread_mutex_lock(&LOCK_hostname));
+ pthread_mutex_lock(&LOCK_hostname);
if (!(hostent= gethostbyname((char*) name_buff)))
{
- VOID(pthread_mutex_unlock(&LOCK_hostname));
+ pthread_mutex_unlock(&LOCK_hostname);
*null_value= 1;
return 0;
}
- VOID(pthread_mutex_unlock(&LOCK_hostname));
+ pthread_mutex_unlock(&LOCK_hostname);
#endif
memcpy_fixed((char*) &in,(char*) *hostent->h_addr_list, sizeof(in.s_addr));
*res_length= (ulong) (strmov(result, inet_ntoa(in)) - result);
@@ -871,14 +871,14 @@ char *reverse_lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
return 0;
}
#else
- VOID(pthread_mutex_lock(&LOCK_hostname));
+ pthread_mutex_lock(&LOCK_hostname);
if (!(hp= gethostbyaddr((char*) &taddr, sizeof(taddr), AF_INET)))
{
- VOID(pthread_mutex_unlock(&LOCK_hostname));
+ pthread_mutex_unlock(&LOCK_hostname);
*null_value= 1;
return 0;
}
- VOID(pthread_mutex_unlock(&LOCK_hostname));
+ pthread_mutex_unlock(&LOCK_hostname);
#endif
*res_length=(ulong) (strmov(result,hp->h_name) - result);
return result;