From 960fc6644714c1231a0822bc24b0750c873557df Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 5 Nov 2010 09:36:00 +0100 Subject: ipa-client code cleanup Fixes errors about implicit function declaration and moves duplicated gettext code into a common module. Also silences some warnings. Signed-off-by: Simo Sorce --- ipa-client/config.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'ipa-client/config.c') diff --git a/ipa-client/config.c b/ipa-client/config.c index 69bd9cb33..31060e39f 100644 --- a/ipa-client/config.c +++ b/ipa-client/config.c @@ -39,8 +39,8 @@ #include #include "config.h" -#include -#define _(STRING) gettext(STRING) + +#include "ipa-client-common.h" char * read_config_file(const char *filename) @@ -88,7 +88,7 @@ read_config_file(const char *filename) char * get_config_entry(char * in_data, const char *section, const char *key) { - char *ptr, *p, *tmp; + char *ptr = NULL, *p, *tmp; char *line; int in_section = 0; char * data; @@ -164,27 +164,3 @@ get_config_entry(char * in_data, const char *section, const char *key) free(data); return NULL; } - -int init_gettext(void) -{ - char *c; - - c = setlocale(LC_ALL, ""); - if (!c) { - return EIO; - } - - errno = 0; - c = bindtextdomain(PACKAGE, LOCALEDIR); - if (c == NULL) { - return errno; - } - - errno = 0; - c = textdomain(PACKAGE); - if (c == NULL) { - return errno; - } - - return 0; -} -- cgit