[PATCH v7] tests/fcntl.c: add test for print_f_owner_ex
Dmitry V. Levin
ldv at altlinux.org
Sat Apr 28 20:33:37 UTC 2018
On Tue, Apr 17, 2018 at 02:10:42PM +0000, Zhibin Li wrote:
> On Tue, Apr 17, 2018, 21:09 Zhibin Li <08826794brmt at gmail.com> wrote:
[...]
> > +static long
> > +test_f_owner_ex_type_pid(const int cmd, const char *const cmd_name, ...)
> > +{
> > + va_list ap;
> > + va_start(ap, cmd_name);
> > +
> > + long rc;
> > + const char *type_name;
> > +
> > + TAIL_ALLOC_OBJECT_CONST_PTR(struct f_owner_ex, fo);
> > +
> > + if ((type_name = va_arg(ap, char *)) != NULL) {
> >
> here I forgot to use !!(expression) again, I will correct it in my next
> patch.
We use !!(expression) when we need either 0 or 1, which is not the case
here.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180428/be412520/attachment.bin>
More information about the Strace-devel
mailing list