From: Robert Spalek Date: Fri, 28 Apr 2006 16:51:22 +0000 (+0200) Subject: conf2: allow :clear on string attributes X-Git-Tag: holmes-import~645^2~11^2~4 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=832d6b684417271495ce6434417afbd42bf208a1;p=libucw.git conf2: allow :clear on string attributes --- diff --git a/lib/conf-intr.c b/lib/conf-intr.c index 5895bd6b..0988f5b7 100644 --- a/lib/conf-intr.c +++ b/lib/conf-intr.c @@ -269,8 +269,11 @@ interpret_clear(struct cf_item *item, void *ptr) } else if (item->cls == CC_DYNAMIC) { cf_journal_block(ptr, sizeof(void *)); * (void**) ptr = NULL; + } else if (item->cls == CC_STATIC && item->type == CT_STRING) { + cf_journal_block(ptr, item->number * sizeof(byte*)); + bzero(ptr, item->number * sizeof(byte*)); } else - return "The item is not a list or a dynamic array"; + return "The item is not a list, dynamic array, or string"; return NULL; }