{
assert((sizeof binoperstr / sizeof binoperstr[0]) ==
(sizeof op1 / sizeof op1[0]));
- for (i = 0; i < sizeof op1 / sizeof op1[0]; i++)
+ for (i = 0; i < (int)(sizeof op1 / sizeof op1[0]); i++)
{
if (oper == op1[i])
{
- strcpy(opername, binoperstr[i]);
+ strncpy(opername, binoperstr[i], sizeof(opername) - 1);
+ opername[sizeof(opername) - 1] = 0;
savepri = binoper_savepri[i];
break;
} /* if */
(sizeof unopers / sizeof unopers[0]));
if (opername[0] == '\0')
{
- for (i = 0; i < sizeof unopers / sizeof unopers[0]; i++)
+ for (i = 0; i < (int)(sizeof unopers / sizeof unopers[0]); i++)
{
if (oper == unopers[i])
{
- strcpy(opername, unoperstr[i]);
+ strncpy(opername, unoperstr[i], sizeof(opername) - 1);
+ opername[sizeof(opername) - 1] = 0;
break;
} /* if */
} /* for */
return FALSE;
} /* if */
- /* check existance and the proper declaration of this function */
+ /* check existence and the proper declaration of this function */
if ((sym->usage & uMISSING) != 0 || (sym->usage & uPROTOTYPED) == 0)
{
char symname[2 * sNAMEMAX + 16]; /* allow space for user defined operators */
else if (savealt)
{
/* for the assignment operator, ALT may contain an address at which the
- * result must be stored; this address must be preserved accross the
+ * result must be stored; this address must be preserved across the
* call
*/
assert(lval != NULL); /* this was checked earlier */
*
* Lowest hierarchy level (except for the , operator).
*
- * Global references: intest (reffered to only)
+ * Global references: intest (referred to only)
*/
int
hier14(value * lval1)
if (sym && sym->ident != iFUNCTN && sym->ident != iREFFUNC
&& (sym->usage & uDEFINE) == 0)
sym = NULL; /* symbol is not a function, it is in the table, but not "defined" */
- val = (sym != NULL);
+ val = !!sym;
if (!val && find_subst(st, strlen(st)))
val = 1;
clear_value(lval);