Skip to contentSkip to conversation

dev-mornfall-activate - dmeventd: convert union to struct members

PATCH Petr Rockai 1 participant 1 message Jun 4, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5ea466673af377328a7ed50d6fb24e66a478b44b
Commit:        5ea466673af377328a7ed50d6fb24e66a478b44b
Parent:        45f396f2a075054f4e047abdef5eafffca72a281
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Apr 19 20:44:20 2013 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sun Apr 21 23:01:35 2013 +0200

dmeventd: convert union to struct members

Sharing char* with field has a problem in error path, when we allocate event, but fail to allocate timeout string. Instead of creating complicated error paths to resolve it individually stop using unions, and let the resource to be released in a simple _free_message().

---
 WHATS_NEW_DM                |    1 +
 daemons/dmeventd/dmeventd.c |   54 ++++++++++++++++---------------------------
 2 files changed, 21 insertions(+), 34 deletions(-)
WHATS_NEW_DM +1 -0
index eff6bd6..6e45a4c 100644
@@ -1,5 +1,6 @@
 Version 1.02.78 - 
 ===================================
+  Update dmevent structure message_data to simplify/fix error path handling.
   Validate passed params to dm_get_status_raid/thin/thin_pool(). 
   Fix 'dmsetup splitname -o' to not fail if used without '-c' switch (1.02.68).
   Add dm_config_write_{node_out/one_node_out} for enhanced config output.
daemons/dmeventd/dmeventd.c +20 -34

97 lines not on this page · raw message