Release calc version 2.11.0t9.4.4

This commit is contained in:
Landon Curt Noll
1999-11-09 17:58:42 -08:00
parent 7d0b761de3
commit 58d32c68f9
6 changed files with 160 additions and 10 deletions

View File

@@ -979,10 +979,23 @@ stralloc(void)
}
freeStr[STRALLOC - 1].s_next = NULL;
freeStr[STRALLOC - 1].s_links = 0;
for (temp = freeStr + STRALLOC - 2; temp >= freeStr; --temp) {
/*
* We prevent the temp pointer from walking behind freeStr
* by stopping one short of the end and running the loop one
* more time.
*
* We would stop the loop with just temp >= freeStr, but
* doing this helps make code checkers such as insure happy.
*/
for (temp = freeStr + STRALLOC - 2; temp > freeStr; --temp) {
temp->s_next = temp + 1;
temp->s_links = 0;
}
/* run the loop manually one last time */
temp->s_next = temp + 1;
temp->s_links = 0;
blockcount++;
if (firstStrs == NULL) {
newfn = (STRING **) malloc( blockcount * sizeof(STRING *));