Re: tst_kvercmp: Factor out error handling

Cyril Hrubis <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi!
> > > tst_kvercmp: Factor out error handling
> 
> > --- [PATCH 1/9] ---
> 
> > > static int _tst_parse_kver(const char *str_kver, int *v1, int *v2, int *v3)
> 
> > Could this be renamed to parse_kver? File-scope identifiers beginning with an
> > underscore are reserved by C, and LTP's coding rules prohibit such names.
> 
> I thought this is wrong, because we have functions with underscore, but it's
> trailing underscore, not the leading one.
> 
> => I'll rename to tst_parse_kver_().
> 
> Also, agent does not know about LTP rule to have functions in lib with leading
> tst_.

This is a static function, so the identifier is not visible outside of
the file, therefore there is no need for the tst_ prefix. On the
contrary it's better if there is no prefix so that it's clear that it's
not external API.

-- 
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.