SHARE
TWEET

Untitled

a guest Sep 18th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void* Realocate(void*buf, int os, int ns)
  2. {
  3.     void*temp;
  4.     temp = malloc(os);
  5.     memcpy((void*)temp, (void*)buf, os);
  6.     free(buf);
  7.     buf = malloc(ns);
  8.     memset(buf, 0, ns);
  9.     memcpy((void*)buf, (void*)temp, ns);
  10.     return buf;
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top