Commits

Sebastian Freundt  committed 9434809

fix to fix, bring back errno errors for duration strings

dt_io_strpdtdur() and dt_io_strpdtrnd() set errno to ERANGE sometimes.

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>

  • Participants
  • Parent commits 70c7808

Comments (0)

Files changed (3)

 					/* that's ok, must be a date then */
 					dt_given_p = true;
 				} else {
-					error(0, "Error: \
+					error(errno, "Error: \
 cannot parse duration string `%s'", st.istr);
 					res = 1;
 					goto dur_out;

File src/dround.c

 					/* that's ok, must be a date then */
 					dt_given_p = true;
 				} else {
-					error(0, "Error: \
+					error(errno, "Error: \
 cannot parse duration/rounding string `%s'", st.istr);
 				}
 			}
 		do {
 			if (dt_io_strpdtdur(&st, argi->alt_inc_arg) < 0) {
 				if (!argi->quiet_given) {
-					error(0, "Error: \
+					error(errno, "Error: \
 cannot parse duration string `%s'", argi->alt_inc_arg);
 				}
 				res = 1;