Skip to content

Commit

Permalink
libutils: fix style
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h authored and lsf37 committed Jan 31, 2024
1 parent 5a0472c commit b8d0d3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libutils/include/utils/auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
* // no need to call free(x)
* }
*/
static inline void autofree_(void *p) {
void **q = (void**)p;
static inline void autofree_(void *p)
{
void **q = (void **)p;
free(*q);
}

#define AUTOFREE __attribute__((cleanup(autofree_)))

0 comments on commit b8d0d3a

Please sign in to comment.