From: chrubis@suse.cz
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] lib/tst_sig.c: output signal name when got unexpected signal
Date: Mon, 12 May 2014 12:46:20 +0200 [thread overview]
Message-ID: <20140512104620.GA3293@rei> (raw)
In-Reply-To: <536AEECE.2040606@cn.fujitsu.com>
Hi!
> >> lib/errnos.h | 2 +-
> >> lib/signame.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >> lib/tst_res.c | 3 ++
> >> lib/tst_sig.c | 4 ++-
> >> 4 files changed, 99 insertions(+), 2 deletions(-)
> >> create mode 100644 lib/signame.h
> >>
> >> diff --git a/lib/errnos.h b/lib/errnos.h
> >> index 8e80e07..bb42233 100644
> >> --- a/lib/errnos.h
> >> +++ b/lib/errnos.h
> >> @@ -27,7 +27,7 @@
> >>
> >> static const char *strerrnodef(int err)
> >> {
> >> - struct pair errno_pairs[] = {
> >> + static struct pair errno_pairs[] = {
> >> {.name = "SUCCESS", .val = 0},
> >> /* asm-generic/errno-base.h */
> >> PAIR(EPERM)
> > Why have you removed the static? Do we need to have the errno_pairs
> > variable visible outside the tst_res.c?
> Here I added the static modifier, not removed, to let errno_pairs array not be
> allocated in the stack in every strerrnodef call.
My bad, I've mistaken addition/removal. We should also declare it as const too.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2014-05-12 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 10:43 [LTP] [PATCH] lib/tst_sig.c: output signal name when got unexpected signal Xiaoguang Wang
2014-05-07 16:23 ` chrubis
[not found] ` <536AEECE.2040606@cn.fujitsu.com>
2014-05-12 10:46 ` chrubis [this message]
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=20140512104620.GA3293@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=wangxg.fnst@cn.fujitsu.com \
/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