Move extern declarations for ext_password backends into a header file
authorJouni Malinen <j@w1.fi>
Fri, 24 Jun 2016 14:30:26 +0000 (17:30 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 24 Jun 2016 16:02:58 +0000 (19:02 +0300)
This gets rid of a sparse warning and also allows the compatibility of
the declarations to be verified (a missing const declaration is fixed
here as well).

Signed-off-by: Jouni Malinen <j@w1.fi>
src/utils/ext_password.c
src/utils/ext_password_i.h

index 0613119..5615bd7 100644 (file)
 #include "ext_password_i.h"
 
 
-#ifdef CONFIG_EXT_PASSWORD_TEST
-extern struct ext_password_backend ext_password_test;
-#endif /* CONFIG_EXT_PASSWORD_TEST */
-
 static const struct ext_password_backend *backends[] = {
 #ifdef CONFIG_EXT_PASSWORD_TEST
        &ext_password_test,
index 043e731..948eaf5 100644 (file)
@@ -20,4 +20,10 @@ struct ext_password_backend {
 
 struct wpabuf * ext_password_alloc(size_t len);
 
+/* Available ext_password backends */
+
+#ifdef CONFIG_EXT_PASSWORD_TEST
+extern const struct ext_password_backend ext_password_test;
+#endif /* CONFIG_EXT_PASSWORD_TEST */
+
 #endif /* EXT_PASSWORD_I_H */