From: Mark van Dijk <lists+linux-lvm@internecto.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: mbooth@redhat.com
Subject: Re: [linux-lvm] [PATCH] dmsetup: fix sscanf return check
Date: Thu, 23 Aug 2012 22:01:34 +0200 [thread overview]
Message-ID: <20120823220134.20a36b13@internecto.net> (raw)
In-Reply-To: <1345728662-28052-1-git-send-email-mbooth@redhat.com>
On Thu, 23 Aug 2012 14:31:02 +0100
Matthew Booth <mbooth@redhat.com> wrote:
> ---
> tools/dmsetup.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/dmsetup.c b/tools/dmsetup.c
> index 0ac970f..65d17f8 100644
> --- a/tools/dmsetup.c
> +++ b/tools/dmsetup.c
> @@ -228,8 +228,7 @@ static int _parse_line(struct dm_task *dmt, char
> *buffer, const char *file, if (!*ptr || *ptr == '#')
> return 1;
>
> - if (sscanf(ptr, "%llu %llu %s %n",
> - &start, &size, ttype, &n) < 3) {
> + if (sscanf(ptr, "%llu %llu %s %n", &start, &size, ttype,
> &n) != 4) { err("Invalid format on line %d of table %s", line, file);
> return 0;
> }
Ah. For non-coders like myself the purpose of this patch seems to be
clouded in mystery...
--
Stay in touch,
Mark van Dijk. ,------------------------------------
-------------------------------' Thu Aug 23 20:00 UTC 2012
Today is Setting Orange, the 16th day of Bureaucracy in the YOLD 3178
next prev parent reply other threads:[~2012-08-23 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 13:31 [linux-lvm] [PATCH] dmsetup: fix sscanf return check Matthew Booth
2012-08-23 20:01 ` Mark van Dijk [this message]
2012-08-23 20:27 ` Alasdair G Kergon
2012-08-24 8:46 ` Matthew Booth
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=20120823220134.20a36b13@internecto.net \
--to=lists+linux-lvm@internecto.net \
--cc=linux-lvm@redhat.com \
--cc=mbooth@redhat.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 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.