public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
Date: Fri, 12 Apr 2019 11:45:19 +0200	[thread overview]
Message-ID: <20190412094518.GC28648@haruka.lan> (raw)
In-Reply-To: <806382ed-953c-f5f4-4629-15c5093b240f@xiaopeng.com>

Hi!
> >>>> diff --git a/include/tst_numa.h b/include/tst_numa.h
> >>>> index a4cd1be37..4f9806602 100644
> >>>> --- a/include/tst_numa.h
> >>>> +++ b/include/tst_numa.h
> >>>> @@ -7,6 +7,8 @@
> >>>>    #ifndef TST_NUMA_H__
> >>>>    #define TST_NUMA_H__
> >>>> +#include <string.h>
> >>>> +
> >>>>    /**
> >>>>     * Numa nodemap.
> >>>>     */
> >>>> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
> >>>> index 97be548b4..edf8c0140 100644
> >>>> --- a/lib/tst_af_alg.c
> >>>> +++ b/lib/tst_af_alg.c
> >>>> @@ -5,6 +5,7 @@
> >>>>    #include <errno.h>
> >>>>    #include <stdlib.h>
> >>>> +#include <string.h>
> >>> Why not simply include <string.h>?? in tst_test.h. I did it in my another
> >>> review thread. This should be OK for most of cases.
> >> Sounds reasonable to me.
> > Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
> > sometimes is <strings.h> needed as well.
> 
> As I know, calls likes str*, mem*, such as, strncpy, memset, requires 
> <string.h>,?? but bzero requires <strings.h>. Fortunately <strings.h> are 
> not used as often as <string.h>. See my another review thread. :-)

bzero() has been deprecated for quite some time, ideally we should
replace it with memset().

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-04-12  9:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 23:31 [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
2019-04-12 19:39   ` Sandeep Patil
2019-04-14  9:59     ` Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes Petr Vorel
2019-04-12  2:12   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12  8:49     ` Cyril Hrubis
2019-04-12  8:48       ` Petr Vorel
2019-04-12  9:05         ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12  9:45           ` Cyril Hrubis [this message]
2019-04-12  9:46             ` Petr Vorel
2019-04-12 16:48           ` Enji Cooper
2019-04-11 23:31 ` [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets Petr Vorel
2019-07-12 13:48   ` Petr Vorel
2019-08-02 13:03     ` Cyril Hrubis
2019-08-02 13:27       ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190412094518.GC28648@haruka.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox