From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Thomas Tuttle <ttuttle@chromium.org>
Cc: linux-kernel@vger.kernel.org,
Marco Stornelli <marco.stornelli@gmail.com>
Subject: Re: [PATCH] ramoops: scripts/ramoops.c for extracting oopses
Date: Thu, 06 Oct 2011 02:02:28 +0530 [thread overview]
Message-ID: <4E8CBEDC.4010502@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111005182503.GA6142@google.com>
Hi,
On 10/05/2011 11:55 PM, Thomas Tuttle wrote:
> +static int print_records(int record)
> +{
> + unsigned long mem_address, mem_size, record_size, num_records;
> + FILE *mem;
> + int i;
> + int ret = 0;
> +
> + read_long(RAMOOPS_PARAM "mem_address", &mem_address);
> + read_long(RAMOOPS_PARAM "mem_size", &mem_size);
> + read_long(RAMOOPS_PARAM "record_size", &record_size);
> + num_records = mem_size / record_size;
> +
> + if (record != REC_LIST &&
> + (record < 0 || (unsigned long)record >= num_records)) {
> + fprintf(stderr, "%s: record number %d out of range [0, %ld)\n",
> + progn, record, num_records);
> + return 1;
> + }
> +
> + buf = malloc(record_size);
Since buf is not declared, this fails program compilation.
> + if (!buf) {
> + fprintf(stderr, "%s: failed to allocate record buffer\n",
> + progn);
> + return 1;
> + }
> +
--
Regards,
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab
prev parent reply other threads:[~2011-10-05 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 18:25 [PATCH] ramoops: scripts/ramoops.c for extracting oopses Thomas Tuttle
2011-10-05 19:20 ` Valdis.Kletnieks
2011-10-06 11:22 ` Marco Stornelli
2011-10-05 20:32 ` Srivatsa S. Bhat [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=4E8CBEDC.4010502@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
--cc=ttuttle@chromium.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.