X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=include%2Fatalk%2Futil.h;fp=include%2Fatalk%2Futil.h;h=312160be008947f71dfa066dd90d7f7e2c9fb6a3;hp=38e1e7b2dd4f36a115c4ca2a73ba5b0d8b60d326;hb=5eb3b5ac51c8221009041928a5a08c101d2be743;hpb=a04d24be19aa000f89ee22d0197da4689cc487b2 diff --git a/include/atalk/util.h b/include/atalk/util.h index 38e1e7b2..312160be 100644 --- a/include/atalk/util.h +++ b/include/atalk/util.h @@ -73,6 +73,10 @@ #define ntoh64(x) (hton64(x)) #endif +#ifndef SAFE_FREE +#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) +#endif + #ifdef WITH_SENDFILE extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count); #endif