/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 1996
* David L. Nugent. All rights reserved.
*
for (i = 0; booltrue[i]; i++)
if (strcmp(str, booltrue[i]) == 0)
- return 1;
+ return P_YES;
for (i = 0; boolfalse[i]; i++)
if (strcmp(str, boolfalse[i]) == 0)
- return 0;
+ return P_NO;
/*
* Special cases for defaultpassword
*/
if (strcmp(str, "random") == 0)
- return -1;
+ return P_RANDOM;
if (strcmp(str, "none") == 0)
- return -2;
+ return P_NONE;
errx(1, "Invalid value for default password");
}