Author: jimw
Date: Wed Jan 3 13:18:12 2007
New Revision: 8510
Modified:
DBD-mysql/trunk/dbdimp.c
Log:
Make warnings when calling free_*() on NULL be more explicit, and only go
to the trace log (not stderr).
Modified: DBD-mysql/trunk/dbdimp.c
==============================================================================
--- DBD-mysql/trunk/dbdimp.c (original)
+++ DBD-mysql/trunk/dbdimp.c Wed Jan 3 13:18:12 2007
@@ -166,14 +166,13 @@
/*
free MYSQL_BIND bind struct
*/
-static void free_bind(MYSQL_BIND* bind)
+static void free_bind(MYSQL_BIND *bind)
{
if (bind)
Safefree(bind);
else {
if (dbis->debug >= 2)
- PerlIO_printf(DBILOGFP, "\t\tFREE ERROR BIND!\n");
- fprintf(stderr,"FREE ERROR BIND!");
+ PerlIO_printf(DBILOGFP, "Warning: called free_bind() on NULL pointer");
}
}
@@ -186,22 +185,20 @@
Safefree(fbind);
else {
if (dbis->debug >= 2)
- PerlIO_printf(DBILOGFP, "\t\tFREE ERROR FBIND!\n");
- fprintf(stderr,"FREE ERROR FBIND!");
+ PerlIO_printf(DBILOGFP, "Warning: called free_fbind() on NULL pointer");
}
}
/*
free imp_sth_fbh_t fbh structure
*/
-static void free_fbuffer(imp_sth_fbh_t * fbh)
+static void free_fbuffer(imp_sth_fbh_t *fbh)
{
if (fbh)
Safefree(fbh);
else {
if (dbis->debug >= 2)
- PerlIO_printf(DBILOGFP, "\t\tFREE ERROR FBUFFER!\n");
- fprintf(stderr,"FREE ERROR FBUFFER!");
+ PerlIO_printf(DBILOGFP, "Warning: called free_fbuffer() on NULL pointer");
}
}
| Thread |
|---|
| • [svn:DBD-mysql] r8510 - DBD-mysql/trunk | jimw | 3 Jan |