summaryrefslogtreecommitdiffstats
path: root/libdimension/error.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
commitbff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch)
tree0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /libdimension/error.c
parent14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff)
downloaddimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimension/error.c')
-rw-r--r--libdimension/error.c11
1 files changed, 5 insertions, 6 deletions
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.");
}
}