From: Ben Pfaff Date: Wed, 11 May 2005 03:09:09 +0000 (+0000) Subject: Add assertions. X-Git-Tag: v0.4.0~78 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca29fee7feccaf818e5395b566318e510366e90;p=pspp-builds.git Add assertions. --- diff --git a/src/ChangeLog b/src/ChangeLog index fbed36d0..bf73f10b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Tue May 10 20:08:18 2005 Ben Pfaff + + * data-in.c: (data_in) Add assertion to check input specifier. + + * data-out.c: (data_out) Add assertion to check output specifier. + Tue May 10 19:56:35 2005 Ben Pfaff Fix PR 13054. diff --git a/src/data-in.c b/src/data-in.c index 8f36dcb0..d17a2cf7 100644 --- a/src/data-in.c +++ b/src/data-in.c @@ -1363,6 +1363,8 @@ data_in (struct data_in *i) { const struct fmt_desc *const fmt = &formats[i->format.type]; + assert (check_input_specifier (&i->format, 0)); + /* Check that we've got a string to work with. */ if (i->e == i->s || i->format.w <= 0) { diff --git a/src/data-out.c b/src/data-out.c index 7b79a26f..4289490b 100644 --- a/src/data-out.c +++ b/src/data-out.c @@ -62,6 +62,7 @@ data_out (char *s, const struct fmt_spec *fp, const union value *v) int cat = formats[fp->type].cat; int ok; + assert (check_output_specifier (fp, 0)); if (!(cat & FCAT_STRING)) { /* Numeric formatting. */