diff options
author | reinelt <> | 2004-01-27 04:48:57 +0000 |
---|---|---|
committer | reinelt <> | 2004-01-27 04:48:57 +0000 |
commit | d602ccbe7f2bd677501ba99109052ea40f5806ae (patch) | |
tree | 84bd625fcbd1418c7ed19a58b6bc89eab3d1dd88 /hash.c | |
parent | faf4fc86147ef079a2a4ec2ab7ec2ca04fe112f4 (diff) | |
download | lcd4linux-d602ccbe7f2bd677501ba99109052ea40f5806ae.tar.gz |
[lcd4linux @ 2004-01-27 04:48:57 by reinelt]
bug with hash_age() fixed (thanks to Markus Keil for pointing this out)
Diffstat (limited to '')
-rw-r--r-- | hash.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: hash.c,v 1.9 2004/01/22 07:57:45 reinelt Exp $ +/* $Id: hash.c,v 1.10 2004/01/27 04:48:57 reinelt Exp $ * * hashes (associative arrays) * @@ -23,6 +23,9 @@ * * * $Log: hash.c,v $ + * Revision 1.10 2004/01/27 04:48:57 reinelt + * bug with hash_age() fixed (thanks to Markus Keil for pointing this out) + * * Revision 1.9 2004/01/22 07:57:45 reinelt * several bugs fixed where segfaulting on layout>display * Crystalfontz driver optimized, 632 display already works @@ -155,8 +158,7 @@ static HASH_ITEM* hash_set_string (HASH *Hash, char *key, char *val) if (Item!=NULL) { if (Item->val) free (Item->val); Item->val = strdup(val); - gettimeofday(&(Item->time), NULL); - return Item; + goto hash_got_string; } // add entry @@ -170,6 +172,7 @@ static HASH_ITEM* hash_set_string (HASH *Hash, char *key, char *val) Item->val = strdup(val); Item->Slot = NULL; + hash_got_string: // set timestamps gettimeofday(&Hash->time, NULL); Item->time=Hash->time; |