aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 13:01:18 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 13:01:18 +0000
commit18a994a6bd010c8cc2aaf4ab71cac668456478f3 (patch)
treeabb46c31afc6ebcdf0fe23efebceddacd74b349a /main/utils.c
parent45e15356337a46b7d541bbf4c86bdd2f2d329aa8 (diff)
somehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153823 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 9749949e1..a802fd324 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -954,8 +954,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 */