[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0912091231l75e4cd13te3d073477455189@mail.gmail.com>
Date: Wed, 9 Dec 2009 15:31:52 -0500
From: Mike Frysinger <vapier.adi@...il.com>
To: Américo Wang <xiyou.wangcong@...il.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] modpost: fix asprintf warnings
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists