mirror of
https://github.com/mpv-player/mpv
synced 2024-12-19 13:21:13 +00:00
ta: remove TA_FREEP NULL check
The NULL check triggers a gcc warning when passing the address of a variable to it. I was about to silence the warning with some equivalent code (that just happens to shut up gcc), but then I decided to remove the NULL check as I don't see a reason why we should allow this. We don't use it in the existing code anyway (all callers do something like TA_FREEP(&structptr->member), which is always non-NULL). Also fix some of the macro argument "quoting".
This commit is contained in:
parent
f2a24ccfa5
commit
d230194f62
@ -73,7 +73,7 @@ char *ta_talloc_asprintf_append_buffer(char *s, const char *fmt, ...) TA_PRF(2,
|
||||
|
||||
// mpv specific stuff - should be made part of proper TA API
|
||||
|
||||
#define TA_FREEP(pctx) do {if (pctx) {talloc_free(*pctx); (*pctx) = NULL;}} while(0)
|
||||
#define TA_FREEP(pctx) do {talloc_free(*(pctx)); *(pctx) = NULL;} while(0)
|
||||
|
||||
#define TA_EXPAND_ARGS(...) __VA_ARGS__
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user