summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2013-04-10 12:37:17 +0200
committerStef Walter <stefw@redhat.com>2013-04-10 12:37:17 +0200
commit2d412510118a1af08e6fba300129282773386292 (patch)
treee5f42ca9de408ebaa398786a4c139ca9a2864a65 /tools
parent834c9f875e33eb28cf063858133e347e73593c54 (diff)
Make ADCLI_STRICT=1 abort() when precondition
Diffstat (limited to 'tools')
-rw-r--r--tools/computer.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/computer.c b/tools/computer.c
index 5974012..692b8bb 100644
--- a/tools/computer.c
+++ b/tools/computer.c
@@ -24,9 +24,9 @@
#include "config.h"
#include "adcli.h"
-#include "adprivate.h"
#include "tools.h"
+#include <assert.h>
#include <err.h>
#include <stdio.h>
@@ -201,7 +201,7 @@ parse_option (Option opt,
/* Should be handled by caller */
case opt_show_details:
- return_if_reached();
+ assert (0 && "not reached");
break;
}
@@ -319,7 +319,6 @@ adcli_tool_computer_preset (adcli_conn *conn,
{
adcli_enroll *enroll;
adcli_result res;
- char *generated = NULL;
adcli_enroll_flags flags;
int reset_password = 1;
int opt;
@@ -401,12 +400,6 @@ adcli_tool_computer_preset (adcli_conn *conn,
printf ("computer-name: %s\n", adcli_enroll_get_computer_name (enroll));
}
- /* Print out the password */
- if (generated != NULL) {
- printf ("one-time-password: %s\n", generated);
- free (generated);
- }
-
adcli_enroll_unref (enroll);
return 0;