]> git.meshlink.io Git - catta/blobdiff - rr.c
* add todo list
[catta] / rr.c
diff --git a/rr.c b/rr.c
index 4108c54cf1be6cba627b38a772dcd1ca89eeb0fe..294d409ea493e18cf86c51c2dc26c524a1c33205 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -49,8 +49,8 @@ flxRecord *flx_record_new(flxKey *k, gconstpointer data, guint16 size, guint32 t
     flxRecord *r;
     
     g_assert(k);
-    g_assert(data);
-
+    g_assert(size == 0 || data);
+    
     r = g_new(flxRecord, 1);
     r->ref = 1;
     r->key = flx_key_ref(k);
@@ -64,6 +64,9 @@ flxRecord *flx_record_new(flxKey *k, gconstpointer data, guint16 size, guint32 t
 flxRecord *flx_record_new_full(const gchar *name, guint16 class, guint16 type, gconstpointer data, guint16 size, guint32 ttl) {
     flxRecord *r;
     flxKey *k;
+
+    g_assert(name);
+    g_assert(size == 0 || data);
     
     k = flx_key_new(name, class, type);
     r = flx_record_new(k, data, size, ttl);