cleanups: address compiler warnings
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
diff --git a/libcap/cap_text.c b/libcap/cap_text.c
index 42fb685..9bce095 100644
--- a/libcap/cap_text.c
+++ b/libcap/cap_text.c
@@ -288,7 +288,8 @@
#endif
char *tmp, *result;
- asprintf(&tmp, "%u", cap);
+ if (asprintf(&tmp, "%u", cap) < 0)
+ return NULL;
result = _libcap_strdup(tmp);
free(tmp);
diff --git a/pam_cap/pam_cap.c b/pam_cap/pam_cap.c
index e6ebbe9..efd263c 100644
--- a/pam_cap/pam_cap.c
+++ b/pam_cap/pam_cap.c
@@ -210,7 +210,7 @@
static void parse_args(int argc, const char **argv, struct pam_cap_s *pcs)
{
- int ctrl=0;
+ int ctrl;
/* step through arguments */
for (ctrl=0; argc-- > 0; ++argv) {