From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/label/label.c
Date: 8 Feb 2012 11:12:18 -0000 [thread overview]
Message-ID: <20120208111218.29797.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-02-08 11:12:18
Modified files:
. : WHATS_NEW
lib/label : label.c
Log message:
Use dm_list_iterate_items_safe
And avoid direct access to list member variables.
Inline _free_li().
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2263&r2=1.2264
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/label/label.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55
--- LVM2/WHATS_NEW 2012/02/08 11:05:04 1.2263
+++ LVM2/WHATS_NEW 2012/02/08 11:12:18 1.2264
@@ -1,5 +1,6 @@
Version 2.02.91 -
===================================
+ Use list functions for label_exit().
Ensure strncpy() function always ends with '\0'.
Set status in _fsadm_cmd() for error path.
Add missing deps for lvm2api for rebuild when lvm-internal is changed.
--- LVM2/lib/label/label.c 2011/06/01 15:30:36 1.54
+++ LVM2/lib/label/label.c 2012/02/08 11:12:18 1.55
@@ -56,11 +56,6 @@
return li;
}
-static void _free_li(struct labeller_i *li)
-{
- dm_free(li);
-}
-
int label_init(void)
{
dm_list_init(&_labellers);
@@ -69,14 +64,12 @@
void label_exit(void)
{
- struct dm_list *c, *n;
- struct labeller_i *li;
+ struct labeller_i *li, *tli;
- for (c = _labellers.n; c && c != &_labellers; c = n) {
- n = c->n;
- li = dm_list_item(c, struct labeller_i);
+ dm_list_iterate_items_safe(li, tli, &_labellers) {
+ dm_list_del(&li->list);
li->l->ops->destroy(li->l);
- _free_li(li);
+ dm_free(li);
}
dm_list_init(&_labellers);
next reply other threads:[~2012-02-08 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 11:12 zkabelac [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-01 15:30 LVM2 ./WHATS_NEW lib/label/label.c agk
2006-11-14 15:03 agk
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=20120208111218.29797.qmail@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@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.