[LTP] [PATCH v7 2/7] SAFE_MACROS: Add socket(), bind(), listen(), connect() and getsockname()

Zeng Linggang zenglg.jy@cn.fujitsu.com
Thu Oct 8 03:34:21 CEST 2015


Hi,

On Wed, 2015-10-07 at 15:07 +0200, Cyril Hrubis wrote:
> Hi!
> > +char *ltp_sock_addr(const struct sockaddr *sa, socklen_t salen);
> > +#define LTP_SOCK_ADDR(sa, salen)	ltp_sock_addr(sa, salen)
> 
> Why do we define the LTP_SOCK_ADDR() as a macro?
> 

Indeed, it is not necessary.

> As far as I can see it's does not add any value over calling the
> function.
> 
> Also we tend to prefix LTP internal funciton with tst_ rather than ltp_
> but that is minor.

OK, I got it.

Thanks for your review.

Best regards,
Zeng
> 




More information about the Ltp mailing list