From bff7f2b3b440c30d0d6eb692576af57ef42edd1b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 8 Jul 2009 17:12:02 +0000 Subject: Comments and style adjustments, and a couple fixes. --- libdimension/error.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libdimension/error.c') diff --git a/libdimension/error.c b/libdimension/error.c index df3ade3..81278f1 100644 --- a/libdimension/error.c +++ b/libdimension/error.c @@ -49,7 +49,7 @@ dmnsn_get_resilience() if (pthread_mutex_lock(&dmnsn_resilience_mutex) != 0) { /* Couldn't lock the mutex, so warn and continue. */ fprintf(stderr, "Dimension WARNING: %s, line %u: %s\n", - __PRETTY_FUNCTION__, __LINE__, + DMNSN_FUNC, __LINE__, "Couldn't lock resilience mutex."); } resilience = dmnsn_resilience; /* Copy the static variable to a local */ @@ -57,7 +57,7 @@ dmnsn_get_resilience() /* Couldn't unlock the mutex, so warn and continue. If the mutex was locked earlier, the next dmnsn_get/set_resilience is likely to hang. */ fprintf(stderr, "Dimension WARNING: %s, line %u: %s\n", - __PRETTY_FUNCTION__, __LINE__, + DMNSN_FUNC, __LINE__, "Couldn't unlock resilience mutex."); } return resilience; @@ -69,8 +69,7 @@ dmnsn_set_resilience(dmnsn_severity resilience) { if (resilience > DMNSN_SEVERITY_HIGH) { /* Tried to set an illegal resilience, bail out */ - fprintf(stderr, "Dimension ERROR: %s, line %u: %s\n", - __PRETTY_FUNCTION__, __LINE__, + fprintf(stderr, "Dimension ERROR: %s, line %u: %s\n", DMNSN_FUNC, __LINE__, "Resilience has wrong value."); exit(EXIT_FAILURE); } @@ -78,7 +77,7 @@ dmnsn_set_resilience(dmnsn_severity resilience) if (pthread_mutex_lock(&dmnsn_resilience_mutex) != 0) { /* Couldn't lock the mutex, so warn and continue. */ fprintf(stderr, "Dimension WARNING: %s, line %u: %s\n", - __PRETTY_FUNCTION__, __LINE__, + DMNSN_FUNC, __LINE__, "Couldn't lock resilience mutex."); } dmnsn_resilience = resilience; @@ -86,7 +85,7 @@ dmnsn_set_resilience(dmnsn_severity resilience) /* Couldn't unlock the mutex, so warn and continue. If the mutex was locked earlier, the next dmnsn_get/set_resilience is likely to hang. */ fprintf(stderr, "Dimension WARNING: %s, line %u: %s\n", - __PRETTY_FUNCTION__, __LINE__, + DMNSN_FUNC, __LINE__, "Couldn't unlock resilience mutex."); } } -- cgit v1.2.3