summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-rmkeytab.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-11-05 09:36:00 +0100
committerSimo Sorce <ssorce@redhat.com>2010-11-22 16:01:35 -0500
commit960fc6644714c1231a0822bc24b0750c873557df (patch)
tree4bc28ddd72920bc8d81a69a647a421be2800655a /ipa-client/ipa-rmkeytab.c
parent7086c9e8635a47966a7222e8efa30e873f0c1d95 (diff)
downloadfreeipa-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/ipa-rmkeytab.c')
-rw-r--r--ipa-client/ipa-rmkeytab.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/ipa-client/ipa-rmkeytab.c b/ipa-client/ipa-rmkeytab.c
index c46bb8b6c..1ccf67327 100644
--- a/ipa-client/ipa-rmkeytab.c
+++ b/ipa-client/ipa-rmkeytab.c
@@ -25,10 +25,8 @@
#include <popt.h>
#include <errno.h>
+#include "ipa-client-common.h"
#include "config.h"
-#include <libintl.h>
-#define _(STRING) gettext(STRING)
-
int
remove_principal(krb5_context context, krb5_keytab ktid, const char *principal, int debug)
@@ -143,32 +141,8 @@ done:
return rval;
}
-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;
-}
-
int
-main(int argc, char **argv)
+main(int argc, const char **argv)
{
krb5_context context;
krb5_error_code krberr;
@@ -180,7 +154,7 @@ main(int argc, char **argv)
static const char *principal = NULL;
static const char *realm = NULL;
int debug = 0;
- int ret, rval;
+ int ret, rval = 0;
struct poptOption options[] = {
{ "debug", 'd', POPT_ARG_NONE, &debug, 0,
_("Print debugging information"), _("Debugging output") },