Use INFINITY and NAN macros instead of 1/0 and 0/0

This commit is contained in:
Mans Rullgard
2010-10-18 21:42:26 +01:00
parent f318ee3e37
commit 324e7ee260
2 changed files with 5 additions and 5 deletions

View File

@@ -198,7 +198,7 @@ unknown_opt:
} else if (po->flags & OPT_INT64) {
*po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
} else if (po->flags & OPT_FLOAT) {
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
} else if (po->flags & OPT_FUNC2) {
if (po->u.func2_arg(opt, arg) < 0) {
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);