summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-02-26 18:19:59 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-03-02 15:29:17 +0100
commitcac22be9e58abdcf6c3bf66190fba0f7cb6f490e (patch)
treeaf824a62dd1dab9f11e33e5c5994afd801fb8513
parentc820e6db26426c9f74a0e8f8ff9d9cf79d57406a (diff)
downloadsssd-cac22be9e58abdcf6c3bf66190fba0f7cb6f490e.tar.gz
sssd-cac22be9e58abdcf6c3bf66190fba0f7cb6f490e.tar.xz
sssd-cac22be9e58abdcf6c3bf66190fba0f7cb6f490e.zip
Remove useless assignment to function parameter
Reported by: cppcheck void free_fun(struct info *info) free(info->name); free(info); info = NULL; ^^^^^^^^^^^ Assignment to function parameter has no effect outside the function. Reviewed-by: Pavel Reichl <preichl@redhat.com>
-rw-r--r--src/krb5_plugin/sssd_krb5_locator_plugin.c1
-rw-r--r--src/providers/ipa/hbac_evaluator.c1
-rw-r--r--src/sss_client/pam_sss.c1
3 files changed, 0 insertions, 3 deletions
diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c
index a3a07d642..aa8d387a5 100644
--- a/src/krb5_plugin/sssd_krb5_locator_plugin.c
+++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c
@@ -250,7 +250,6 @@ void sssd_krb5_locator_close(void *private_data)
free(ctx->kpasswd_addr);
free(ctx->sssd_realm);
free(ctx);
- private_data = NULL;
return;
}
diff --git a/src/providers/ipa/hbac_evaluator.c b/src/providers/ipa/hbac_evaluator.c
index 6190fe279..f40f9e0a7 100644
--- a/src/providers/ipa/hbac_evaluator.c
+++ b/src/providers/ipa/hbac_evaluator.c
@@ -315,7 +315,6 @@ void hbac_free_info(struct hbac_info *info)
free(info->rule_name);
free(info);
- info = NULL;
}
const char *hbac_error_string(enum hbac_error_code code)
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index 28a36d5af..6105cac0e 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -124,7 +124,6 @@ static void logger(pam_handle_t *pamh, int level, const char *fmt, ...) {
static void free_exp_data(pam_handle_t *pamh, void *ptr, int err)
{
free(ptr);
- ptr = NULL;
}
static void close_fd(pam_handle_t *pamh, void *ptr, int err)