Handle a number of warnings - including missing prototype,
authorEzra Peisach <epeisach@mit.edu>
Mon, 29 Dec 2008 03:36:57 +0000 (03:36 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 29 Dec 2008 03:36:57 +0000 (03:36 +0000)
paraenthesis in conditionals, unused function removal, unused variable
removal.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21621 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/kpropd.c

index a6fb4907a4c760246e7ce63011aab638264e7302..705055dd73083e1048e732ba5eb0cc7996aedcb7 100644 (file)
@@ -249,7 +249,7 @@ main(argc, argv)
     exit(ret);
 }
 
-void resync_alarm(int sn)
+static void resync_alarm(int sn)
 {
     close (gfd);
     if (debug)
@@ -639,8 +639,9 @@ krb5_error_code do_iprop(kdb_log_context *log_ctx)
        params.realm = def_realm;
 
        if (master_svc_princstr == NULL) {
-               if (retval = kadm5_get_kiprop_host_srv_name(kpropd_context,
-                                       def_realm, &master_svc_princstr)) {
+               if ((retval = kadm5_get_kiprop_host_srv_name(kpropd_context,
+                                                            def_realm, 
+                                                            &master_svc_princstr))) {
                        com_err(progname, retval,
                                _("%s: unable to get kiprop host based "
                                        "service name for realm %s\n"),
@@ -652,7 +653,7 @@ krb5_error_code do_iprop(kdb_log_context *log_ctx)
        /*
         * Set cc to the default credentials cache
         */
-       if (retval = krb5_cc_default(kpropd_context, &cc)) {
+       if ((retval = krb5_cc_default(kpropd_context, &cc))) {
                com_err(progname, retval,
                        _("while opening default "
                                "credentials cache"));
@@ -682,8 +683,8 @@ krb5_error_code do_iprop(kdb_log_context *log_ctx)
            }
            /* XXX Memory leak: Old r->data value.  */
        }
-       if (retval = krb5_unparse_name(kpropd_context, iprop_svc_principal,
-                               &iprop_svc_princstr)) {
+       if ((retval = krb5_unparse_name(kpropd_context, iprop_svc_principal,
+                                       &iprop_svc_princstr))) {
                com_err(progname, retval,
                        _("while canonicalizing principal name"));
                krb5_free_principal(kpropd_context, iprop_svc_principal);
@@ -950,7 +951,7 @@ done:
                free(iprop_svc_princstr);
        if (master_svc_princstr)
                free(master_svc_princstr);
-       if (retval = krb5_cc_close(kpropd_context, cc)) {
+       if ((retval = krb5_cc_close(kpropd_context, cc))) {
                com_err(progname, retval,
                        _("while closing default ccache"));
                exit(1);
@@ -984,17 +985,6 @@ unsigned int backoff_from_master(int *cnt) {
        return (btime);
 }
 
-
-static char *
-copy_leading_substring(char *src, size_t len)
-{
-    char *result;
-    result = malloc((len + 1) * sizeof(char));
-    (void) strncpy(result, src, len+1);
-    result[len] = 0;
-    return result;
-}
-
 static void
 kpropd_com_err_proc(whoami, code, fmt, args)
        const char      *whoami;
@@ -1669,7 +1659,6 @@ kadm5_get_kiprop_host_srv_name(krb5_context context,
                               const char *realm,
                               char **host_service_name)
 {
-       kadm5_ret_t ret;
        char *name;
        char *host;