Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void* Realocate(void*buf, int os, int ns)
- {
- void*temp;
- temp = malloc(os);
- memcpy((void*)temp, (void*)buf, os);
- free(buf);
- buf = malloc(ns);
- memset(buf, 0, ns);
- memcpy((void*)buf, (void*)temp, ns);
- return buf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement