fix one more warning missed because i did not have new enough libpri installed
[asterisk/asterisk.git] / 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;
                }
        }