]> mj.ucw.cz Git - libucw.git/commitdiff
Extended types: Let unknown formats behave as XTYPE_FMT_DEFAULT
authorMartin Mares <mj@ucw.cz>
Fri, 25 Jul 2014 10:50:28 +0000 (12:50 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 25 Jul 2014 10:50:28 +0000 (12:50 +0200)
Otherwise, it would be very hard to define new common formats
in the future.

ucw/xtypes-basic.c

index 1c4696b3366483a736426ff85583d6ba4b7c5c5f..94dc1ed0328e17965f43f63d10bd70f581ed837b 100644 (file)
@@ -111,9 +111,8 @@ static const char *xt_bool_format(void *src, u32 fmt UNUSED, struct mempool *poo
       return val ? "true" : "false";
     case XTYPE_FMT_DEFAULT:
     case XTYPE_FMT_RAW:
-      return val ? "1" : "0";
     default:
-      ASSERT(0);
+      return val ? "1" : "0";
     }
 }