public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/daemons/dmeventd libdevmapper-event.c Date: Thu, 06 Jan 2011 10:45:00 -0000 [thread overview] Message-ID: <20110106104541.30667.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-06 10:45:41 Modified files: daemons/dmeventd: libdevmapper-event.c Log message: Remove dead assignment of 'ret' value Variable 'ret' assigned from _do_event() was actually not used and replaced with next assignment without any read of the returned value. Code is reformated - so the error path is put in the if() branch and normal code is put after the 'if' together with FIXME comment. FIXME lowprio: logging needs to be fixed in this code, - multiple log_errors are printed, stacks are missing... Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39 --- LVM2/daemons/dmeventd/libdevmapper-event.c 2011/01/06 09:45:05 1.38 +++ LVM2/daemons/dmeventd/libdevmapper-event.c 2011/01/06 10:45:41 1.39 @@ -715,17 +715,18 @@ uuid = dm_task_get_uuid(dmt); - if (!(ret = _do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE : - DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path, - &msg, dmevh->dso, uuid, dmevh->mask, 0))) { - /* FIXME this will probably horribly break if we get - ill-formatted reply */ - ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask); - } else { + if (_do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE : + DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path, + &msg, dmevh->dso, uuid, dmevh->mask, 0)) { ret = -ENOENT; + stack; goto fail; } + /* FIXME this will probably horribly break if we get + ill-formatted reply */ + ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask); + dm_task_destroy(dmt); dmt = NULL;
next reply other threads:[~2011-01-06 10:45 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-06 10:45 zkabelac [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-03-01 10:41 zkabelac 2011-07-08 12:35 agk 2011-01-06 9:45 zkabelac 2010-03-24 11:36 zkabelac 2010-01-14 10:11 zkabelac
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=20110106104541.30667.qmail@sourceware.org \ --to=zkabelac@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).