aboutsummaryrefslogtreecommitdiff
path: root/libpamc/include/security/pam_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpamc/include/security/pam_client.h')
-rw-r--r--libpamc/include/security/pam_client.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/libpamc/include/security/pam_client.h b/libpamc/include/security/pam_client.h
index 0fc2cf44..f382ac7f 100644
--- a/libpamc/include/security/pam_client.h
+++ b/libpamc/include/security/pam_client.h
@@ -17,6 +17,7 @@ extern "C" {
#include <string.h>
#include <stdio.h>
#include <stdint.h>
+#include <stdlib.h>
#include <sys/types.h>
/* opaque agent handling structure */
@@ -71,10 +72,6 @@ char **pamc_list_agents(pamc_handle_t pch);
* PAM_BP_ MACROS for creating, destroying and manipulating binary prompts
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
#ifndef PAM_BP_ASSERT
# ifdef NDEBUG
# define PAM_BP_ASSERT(x) do {} while (0)
@@ -121,7 +118,7 @@ do { \
if (cntrl) { \
uint32_t __size; \
\
- __size = PAM_BP_MIN_SIZE + data_length; \
+ __size = PAM_BP_MIN_SIZE + (data_length); \
if ((*(old_p) = PAM_BP_CALLOC(1, 1+__size))) { \
__PAM_BP_WOCTET(*(old_p), 3) = __size & 0xFF; \
__PAM_BP_WOCTET(*(old_p), 2) = (__size>>=8) & 0xFF; \
@@ -132,7 +129,7 @@ do { \
PAM_BP_ASSERT("out of memory for binary prompt"); \
} \
} else { \
- *old_p = NULL; \
+ *(old_p) = NULL; \
} \
} else { \
PAM_BP_ASSERT("programming error, invalid binary prompt pointer"); \