Commit b4d1e7ac authored by Samarth Joshi's avatar Samarth Joshi

strcmp instead of == in cache_get and cache_del

parent f71cd6db
......@@ -123,7 +123,7 @@ char* cache_get(char *key)
{
for(int i=0;i<MAX_SIZE;i++)
{
if(array[i]->key == key)
if(strcmp(array[i]->key , key) == 0)
{
while(ATOMIC_TEST_AND_SET(&(array[i]->lock),1) == 1);
remove_element_from_deque(key);
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment