From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6328 invoked by alias); 11 Dec 2011 15:18:33 -0000 Received: (qmail 6308 invoked by uid 9699); 11 Dec 2011 15:18:32 -0000 Date: Sun, 11 Dec 2011 15:18:00 -0000 Message-ID: <20111211151832.6306.qmail@sourceware.org> From: mornfall@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/libdm libdm-config.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00020.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-12-11 15:18:32 Modified files: libdm : libdm-config.c Log message: In the dm_config_*get_* functions, make the actual value retrieval optional (useful for just checking that a given key is of a given type). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-config.c.diff?cvsroot=lvm2&r1=1.15&r2=1.16 --- LVM2/libdm/libdm-config.c 2011/10/28 20:07:38 1.15 +++ LVM2/libdm/libdm-config.c 2011/12/11 15:18:32 1.16 @@ -1111,7 +1111,8 @@ if (!n || !n->v || n->v->type != DM_CFG_INT) return 0; - *result = n->v->v.i; + if (result) + *result = n->v->v.i; return 1; } @@ -1125,7 +1126,8 @@ if (!n || !n->v || n->v->type != DM_CFG_INT) return 0; - *result = (uint64_t) n->v->v.i; + if (result) + *result = (uint64_t) n->v->v.i; return 1; } @@ -1139,7 +1141,8 @@ if (!n || !n->v || n->v->type != DM_CFG_STRING) return 0; - *result = n->v->v.str; + if (result) + *result = n->v->v.str; return 1; } @@ -1154,7 +1157,8 @@ if (!n || !n->v) return 0; - *result = n->v; + if (result) + *result = n->v; return 1; } @@ -1167,7 +1171,8 @@ if (!n || n->v) return 0; - *result = n; + if (result) + *result = n; return 1; }