simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
[asterisk/asterisk.git] / image.c
diff --git a/image.c b/image.c
index 2e039fc..ff67c03 100644 (file)
--- a/image.c
+++ b/image.c
  * \author Mark Spencer <markster@digium.com> 
  */
 
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
 #include "asterisk/sched.h"
 #include "asterisk/options.h"
 #include "asterisk/channel.h"
@@ -103,9 +103,9 @@ static void make_filename(char *buf, int len, char *filename, const char *prefla
                        snprintf(buf, len, "%s.%s", filename, ext);
        } else {
                if (!ast_strlen_zero(preflang))
-                       snprintf(buf, len, "%s/%s/%s-%s.%s", ast_config_AST_VAR_DIR, "images", filename, preflang, ext);
+                       snprintf(buf, len, "%s/%s/%s-%s.%s", ast_config_AST_DATA_DIR, "images", filename, preflang, ext);
                else
-                       snprintf(buf, len, "%s/%s/%s.%s", ast_config_AST_VAR_DIR, "images", filename, ext);
+                       snprintf(buf, len, "%s/%s/%s.%s", ast_config_AST_DATA_DIR, "images", filename, ext);
        }
 }
 
@@ -205,7 +205,6 @@ struct ast_cli_entry show_images =
 
 int ast_image_init(void)
 {
-       ast_cli_register(&show_images);
-       return 0;
+       return ast_cli_register(&show_images);
 }