[netperf-dev] netperf4 commit notice r137 -
branches/glib_migration/src
raj at netperf.org
raj at netperf.org
Fri Apr 7 09:45:42 PDT 2006
Author: raj
Date: 2006-04-07 09:45:41 -0700 (Fri, 07 Apr 2006)
New Revision: 137
Modified:
branches/glib_migration/src/netperf.c
Log:
A fix for another of those trying to print from an uninitialized character
pointer. While we're at it, make sure we don't try to print from a NULL
pointer either.
Modified: branches/glib_migration/src/netperf.c
===================================================================
--- branches/glib_migration/src/netperf.c 2006-04-07 01:34:08 UTC (rev 136)
+++ branches/glib_migration/src/netperf.c 2006-04-07 16:45:41 UTC (rev 137)
@@ -986,7 +986,7 @@
initialize_test(void *data)
{
test_t *test = data;
- xmlChar *id;
+ xmlChar *id = NULL;
xmlNodePtr dep_data = NULL;
int rc = NPE_SUCCESS;
xmlNodePtr cur = NULL;
@@ -1015,9 +1015,14 @@
if (rc == NPE_SUCCESS) {
if (debug) {
+ /* there may not have been an actual dependency, which means
+ that 'id' (which used to be uninitialized, tsk, tsk, tsk) may
+ be NULL */
fprintf(where,
- "%s: %s dependencey on %s successfully resolved\n",
- __func__, test->id, id);
+ "%s: %s's dependency on %s successfully resolved\n",
+ __func__,
+ test->id,
+ (id == NULL ? "none" : (char *)id));
fflush(where);
}
/* any dependency has been successfully resolved
More information about the netperf-dev
mailing list