mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.11.0t3
This commit is contained in:
10
hash.c
10
hash.c
@@ -147,13 +147,13 @@ hash_free(HASH *state)
|
||||
HASH *
|
||||
hash_copy(HASH *state)
|
||||
{
|
||||
HASH *new; /* copy of state */
|
||||
HASH *hnew; /* copy of state */
|
||||
|
||||
/*
|
||||
* malloc new state
|
||||
*/
|
||||
new = (HASH *)malloc(sizeof(HASH));
|
||||
if (new == NULL) {
|
||||
hnew = (HASH *)malloc(sizeof(HASH));
|
||||
if (hnew == NULL) {
|
||||
math_error("hash_init: cannot malloc HASH");
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
@@ -161,8 +161,8 @@ hash_copy(HASH *state)
|
||||
/*
|
||||
* duplicate state
|
||||
*/
|
||||
memcpy((void *)new, (void *)state, sizeof(HASH));
|
||||
return new;
|
||||
memcpy((void *)hnew, (void *)state, sizeof(HASH));
|
||||
return hnew;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user