Fix some splint warnings.

Rmove debug code.
This commit is contained in:
nekral-guest 2009-04-28 22:01:20 +00:00
parent 9b6b06cd03
commit 0f448edf19

View File

@ -44,10 +44,9 @@
static int ni_conv (int num_msg, static int ni_conv (int num_msg,
const struct pam_message **msg, const struct pam_message **msg,
struct pam_response **resp, struct pam_response **resp,
void *appdata_ptr) { unused void *appdata_ptr) {
struct pam_response *responses; struct pam_response *responses;
int count; int count;
fputs ("ni_conv\n", stderr);
assert (NULL != non_interactive_password); assert (NULL != non_interactive_password);
@ -55,7 +54,7 @@ fputs ("ni_conv\n", stderr);
return PAM_CONV_ERR; return PAM_CONV_ERR;
} }
responses = (struct pam_response *) calloc (num_msg, responses = (struct pam_response *) calloc ((size_t) num_msg,
sizeof (*responses)); sizeof (*responses));
if (NULL == responses) { if (NULL == responses) {
return PAM_CONV_ERR; return PAM_CONV_ERR;
@ -66,13 +65,11 @@ fputs ("ni_conv\n", stderr);
switch (msg[count]->msg_style) { switch (msg[count]->msg_style) {
case PAM_PROMPT_ECHO_ON: case PAM_PROMPT_ECHO_ON:
fputs ("PAM_PROMPT_ECHO_ON\n", stderr);
fprintf (stderr, fprintf (stderr,
_("%s: PAM modules requesting echoing are not supported.\n"), _("%s: PAM modules requesting echoing are not supported.\n"),
Prog); Prog);
goto failed_conversation; goto failed_conversation;
case PAM_PROMPT_ECHO_OFF: case PAM_PROMPT_ECHO_OFF:
fputs ("PAM_PROMPT_ECHO_OFF\n", stderr);
responses[count].resp = strdup (non_interactive_password); responses[count].resp = strdup (non_interactive_password);
if (NULL == responses[count].resp) { if (NULL == responses[count].resp) {
goto failed_conversation; goto failed_conversation;