aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
commitd3d057390c26ce35b54750705377c4d3ff4e42bd (patch)
treea04b5ab1a5d778cb8c4239d8cac88ef1a5ebba5d /main/utils.c
parent9a2130e9dec6e913af3b75006c23feb0520d6814 (diff)
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
-rw-r--r--main/utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/utils.c b/main/utils.c
index d7250d960..f99ff8545 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -959,8 +959,11 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
a->start_routine = start_routine;
a->data = data;
start_routine = dummy_start;
- asprintf(&a->name, "%-20s started at [%5d] %s %s()",
- start_fn, line, file, caller);
+ if (asprintf(&a->name, "%-20s started at [%5d] %s %s()",
+ start_fn, line, file, caller) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ a->name = NULL;
+ }
data = a;
}
#endif /* !LOW_MEMORY */