summaryrefslogtreecommitdiff
path: root/main/utils.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
commitbd4eb070f3b292617be20bda069cac47df2f7495 (patch)
treea3750d996d41e35c5df34c29533dd7d9fdcaff24 /main/utils.c
parent1e6864dd9d894db29ebc350b015e9eb58226a021 (diff)
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 eff270fba..9a7a3acd4 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1066,8 +1066,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 */