From 84b70d975143e57454ff4143f54c2100913ad908 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Fri, 28 Feb 2003 00:58:42 +0000 Subject: [PATCH] Minor code restructure for revoke credential RPC to permit reply without error. --- src/slurmd/req.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slurmd/req.c b/src/slurmd/req.c index 37b979de0dc..d0a933b19fa 100644 --- a/src/slurmd/req.c +++ b/src/slurmd/req.c @@ -540,7 +540,7 @@ _job_still_running(uint32_t job_id) static void _rpc_revoke_credential(slurm_msg_t *msg, slurm_addr *cli) { - int rc; + int rc = SLURM_SUCCESS; uid_t req_uid = slurm_auth_uid(msg->cred); revoke_credential_msg_t *req = (revoke_credential_msg_t *) msg->data; @@ -549,8 +549,7 @@ _rpc_revoke_credential(slurm_msg_t *msg, slurm_addr *cli) (unsigned int) req_uid); slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); } else { - rc = revoke_credential(req, conf->cred_state_list); - if (rc < 0) + if (revoke_credential(req, conf->cred_state_list) < 0) error("revoking credential for job %d: %m", req->job_id); else { -- GitLab