]> mj.ucw.cz Git - libucw.git/commitdiff
conf2: allow :clear on string attributes
authorRobert Spalek <robert@ucw.cz>
Fri, 28 Apr 2006 16:51:22 +0000 (18:51 +0200)
committerRobert Spalek <robert@ucw.cz>
Fri, 28 Apr 2006 16:51:22 +0000 (18:51 +0200)
lib/conf-intr.c

index 5895bd6b97c2bfc75f86fe353a42f72f9cee7509..0988f5b7753b1a0761ffd1cd685b15d298300252 100644 (file)
@@ -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;
 }