From: Mike Frysinger <vapier.adi@gmail.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] modpost: fix asprintf warnings
Date: Wed, 9 Dec 2009 15:31:52 -0500 [thread overview]
Message-ID: <8bd0f97a0912091231l75e4cd13te3d073477455189@mail.gmail.com> (raw)
In-Reply-To: <20091209155903.GB3247@hack>
On Wed, Dec 9, 2009 at 10:59, Américo Wang wrote:
> On Wed, Dec 09, 2009 at 07:02:23AM -0500, Mike Frysinger wrote:
>>--- a/scripts/mod/modpost.c
>>+++ b/scripts/mod/modpost.c
>>@@ -1559,7 +1559,8 @@ static void get_markers(struct elf_info *info, struct module *mod)
>> const char *name = strings + sym->st_value;
>> const char *fmt = strchr(name, '\0') + 1;
>> char *line = NULL;
>>- asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt);
>>+ if (asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt) == -1)
>>+ fatal("asprintf() with %s failed", name);
>
> A '\n' is needed.
hmm, i thought fatal() appended a new line automatically. must have
been thinking of one of the other utils.
-mike
next prev parent reply other threads:[~2009-12-09 20:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 12:02 Mike Frysinger
2009-12-09 15:59 ` Américo Wang
2009-12-09 20:31 ` Mike Frysinger [this message]
2009-12-10 1:16 ` [PATCH v2] " Mike Frysinger
2009-12-10 6:52 ` Américo Wang
2009-12-10 11:07 ` Rusty Russell
2009-12-10 11:52 ` Rusty Russell
2009-12-10 11:55 ` Mike Frysinger
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=8bd0f97a0912091231l75e4cd13te3d073477455189@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=xiyou.wangcong@gmail.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
all inboxes | Powered by JetHome®