#include <time.h>
#include "agetpass.h"
-#include "atoi/str2i.h"
+#include "atoi/a2i.h"
#include "defines.h"
#include "getdef.h"
#include "memzero.h"
* appropriate internal format. For finer resolute the chage
* command must be used.
*/
-int main (int argc, char **argv)
+int
+main(int argc, char **argv)
{
const struct passwd *pw; /* Password file entry for user */
usage (E_SUCCESS);
/*@notreached@*/break;
case 'i':
- if ( (str2sl(&inact, optarg) == -1)
- || (inact < -1)) {
+ if (a2sl(&inact, optarg, NULL, 0, -1, LONG_MAX)
+ == -1)
+ {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
anyflag = true;
break;
case 'n':
- if ( (str2sl(&age_min, optarg) == -1)
- || (age_min < -1)) {
+ if (a2sl(&age_min, optarg, NULL, 0, -1, LONG_MAX)
+ == -1)
+ {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
anyflag = true;
break;
case 'w':
- if ( (str2sl(&warn, optarg) == -1)
- || (warn < -1)) {
+ if (a2sl(&warn, optarg, NULL, 0, -1, LONG_MAX)
+ == -1)
+ {
(void) fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
anyflag = true;
break;
case 'x':
- if ( (str2sl(&age_max, optarg) == -1)
- || (age_max < -1)) {
+ if (a2sl(&age_max, optarg, NULL, 0, -1, LONG_MAX)
+ == -1)
+ {
(void) fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);