I think it is not needed to print this log messages, the idea is to print this kind of allocation failure if DEBUG_MALLOC is enabled, and if so, we are already doing it in __ast_alloc_region()<br><br><div class="gmail_quote">
On Sun, Nov 2, 2008 at 9:56 PM, SVN commits to the Asterisk project <span dir="ltr"><<a href="mailto:asterisk-commits@lists.digium.com">asterisk-commits@lists.digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Author: kpfleming<br>
Date: Sun Nov 2 17:56:13 2008<br>
New Revision: 153710<br>
<br>
URL: <a href="http://svn.digium.com/view/asterisk?view=rev&rev=153710" target="_blank">http://svn.digium.com/view/asterisk?view=rev&rev=153710</a><br>
Log:<br>
import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch<br>
<br>
@@ -11601,7 +11607,9 @@<br>
<br>
for (which = span = 0; span < NUM_SPANS; span++) {<br>
if (pris[span].pri && ++which > state) {<br>
- asprintf(&ret, "%d", span + 1); /* user indexes start from 1 */<br>
+ if (asprintf(&ret, "%d", span + 1) < 0) { /* user indexes start from 1 */<br>
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));<br>
+ }<br>
break;<br>
}<br>
}<br>
</blockquote></div><br>