aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftype-double.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-02-05 22:50:17 +0000
committerGuy Harris <guy@alum.mit.edu>2002-02-05 22:50:17 +0000
commit2d3a60e9a94a76448f009c309fc95fa4c02d8529 (patch)
treea9cbbe5b952cd94d5971761df2bc2163c7b9c3df /epan/ftypes/ftype-double.c
parente0828c513d59cb40a36133a2bf931b12ad31f9d5 (diff)
"log" is a name that belongs to the ANSI C89 standard; it refers to a
function that computes the natural logarithm of a double. Using it as the name of a pointer to a routine to do logging can cause namespace collisions; in fact, it *does* cause them on AIX. Rename the function argument to "logfunc". svn path=/trunk/; revision=4700
Diffstat (limited to 'epan/ftypes/ftype-double.c')
-rw-r--r--epan/ftypes/ftype-double.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/epan/ftypes/ftype-double.c b/epan/ftypes/ftype-double.c
index 8fa42e0032..b2b89d8950 100644
--- a/epan/ftypes/ftype-double.c
+++ b/epan/ftypes/ftype-double.c
@@ -1,11 +1,9 @@
/*
- *
- * $Id: ftype-double.c,v 1.4 2001/07/13 00:55:56 guy Exp $
+ * $Id: ftype-double.c,v 1.5 2002/02/05 22:50:17 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -50,7 +48,7 @@ value_get_floating(fvalue_t *fv)
}
static gboolean
-val_from_string(fvalue_t *fv, char *s, LogFunc log)
+val_from_string(fvalue_t *fv, char *s, LogFunc logfunc)
{
char *endptr = NULL;
@@ -58,18 +56,19 @@ val_from_string(fvalue_t *fv, char *s, LogFunc log)
if (endptr == s || *endptr != '\0') {
/* This isn't a valid number. */
- log("\"%s\" is not a valid number.", s);
+ logfunc("\"%s\" is not a valid number.", s);
return FALSE;
}
if (errno == ERANGE) {
if (fv->value.floating == 0) {
- log("\"%s\" causes floating-point underflow.", s);
+ logfunc("\"%s\" causes floating-point underflow.", s);
}
else if (fv->value.floating == HUGE_VAL) {
- log("\"%s\" causes floating-point overflow.", s);
+ logfunc("\"%s\" causes floating-point overflow.", s);
}
else {
- log("\"%s\" is not a valid floating-point number.", s);
+ logfunc("\"%s\" is not a valid floating-point number.",
+ s);
}
return FALSE;
}