Commit c5045548 authored by Samarth Joshi's avatar Samarth Joshi

memset 0

parent d34a27c9
...@@ -36,9 +36,7 @@ void file_del(off_t offset, char *key) ...@@ -36,9 +36,7 @@ void file_del(off_t offset, char *key)
sem_wait(&mutex[index]); sem_wait(&mutex[index]);
char blankspace[512]; char blankspace[512];
for(int i=0; i<512; i++) { memset(blankspace, 0, 512);
blankspace[i] = 0;
}
lseek(fds[index], offset, SEEK_SET); lseek(fds[index], offset, SEEK_SET);
write(fds[index], blankspace, 512); write(fds[index], blankspace, 512);
......
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