fix one more warning missed because i did not have new enough libpri installed
authorKevin P. Fleming <kpfleming@digium.com>
Sun, 2 Nov 2008 19:39:41 +0000 (19:39 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sun, 2 Nov 2008 19:39:41 +0000 (19:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153650 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index a24ed5f..3141856 100644 (file)
@@ -11697,7 +11697,9 @@ static char *complete_span_helper(const char *line, const char *word, int pos, i
 
        for (which = span = 0; span < NUM_SPANS; span++) {
                if (pris[span].pri && ++which > state) {
-                       asprintf(&ret, "%d", span + 1); /* user indexes start from 1 */
+                       if (asprintf(&ret, "%d", span + 1) < 0) {       /* user indexes start from 1 */
+                               ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+                       }
                        break;
                }
        }