[LTP] [PATCH 1/2] ipc/libnewipc.c: add CREATE_MSG to optimize duplicate code

Cyril Hrubis chrubis@suse.cz
Thu Jan 19 15:39:03 CET 2017


Hi!
> +int create_msg(const char *file, const int lineno, key_t key, int msgflg);
> +#define CREATE_MSG(key, msgflg) \
> +	create_msg(__FILE__, __LINE__, key, msgflg)

Looking at this, we should rather start tst_safe_sysv_ipc.h and
implement it as SAFE_MSGGET() so that possibly reusable outside the ipc
directory as well.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list