> extern /*@falseexit@*/ void check (bool x); > # define check(x) \ > do { bool m_res = x; assert (m_res); } while (FALSE) >
< eref er; < employee e;
> # include <assert.h>
< hire(e); --- > check (hire(e) == db_OK);
< int i; --- > size_t i;
< constant int maxEmployeeName; --- > imports <stdio> ; > > constant size_t maxEmployeeName;
< eref er; <
> /*@-mods@*/
> /*@=mods@*/
> /*@-mods@*/
> /*@=mods@*/
< employee e;
> /*@-mods@*/
> /*@=mods@*/
> static unsigned int_toUnsigned (int x) > { > if (x < 0) > { > fprintf (stderr, "Error: int_toUnsigned is negative: %d", x); > return 0; > } > else > { > return (unsigned) x; > } > } >
< if (tmpc->val == er) return TRUE; --- > if (eref_equal (tmpc->val, er)) return TRUE;
< if (elem->val == er) --- > if (eref_equal (elem->val, er))
< malloc (erc_size (c) * (employeePrintSize + 1) + 1); --- > malloc (int_toUnsigned (erc_size (c) * (employeePrintSize + 1) + 1));
> /*@-mods@*/
> /*@=mods@*/
> /*@-mods@*/
< if (employee_equal (&e, &e1)) return er; --- > if (employee_equal (&e, &e1)) > { > erc_iterReturn (it, er);
> } > /*@=mods@*/