diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-11-05 09:36:00 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-11-22 16:01:35 -0500 |
commit | 960fc6644714c1231a0822bc24b0750c873557df (patch) | |
tree | 4bc28ddd72920bc8d81a69a647a421be2800655a /ipa-client/config.c | |
parent | 7086c9e8635a47966a7222e8efa30e873f0c1d95 (diff) | |
download | freeipa-960fc6644714c1231a0822bc24b0750c873557df.tar.gz freeipa-960fc6644714c1231a0822bc24b0750c873557df.tar.xz freeipa-960fc6644714c1231a0822bc24b0750c873557df.zip |
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 <ssorce@redhat.com>
Diffstat (limited to 'ipa-client/config.c')
-rw-r--r-- | ipa-client/config.c | 30 |
1 files changed, 3 insertions, 27 deletions
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 <errno.h> #include "config.h" -#include <libintl.h> -#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; -} |