Prevent NULL-pointer induced segfaults.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 12 Feb 2003 06:38:18 +0000 (06:38 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 12 Feb 2003 06:38:18 +0000 (06:38 +0000)
Is tdb_pack in appliance_head different for some reason?

Andrew Bartlett
(This used to be commit 9deb14a2e63fa71a05915b5ab865b8d0c11df098)

source3/printing/notify.c

index feae9c04c1c07f12128e9bcdcc15e6fa701d3a6e..2df28a9345b26b2e94972619bbeb15fbac0d3c64 100644 (file)
@@ -79,18 +79,18 @@ again:
 
        /* Pack header */
 
-       len += tdb_pack(buf + len, buflen - len, NULL, "f", msg->printer);
+       len += tdb_pack(buf + len, buflen - len, "f", msg->printer);
 
-       len += tdb_pack(buf + len, buflen - len, NULL, "ddddd",
+       len += tdb_pack(buf + len, buflen - len, "ddddd",
                        msg->type, msg->field, msg->id, msg->len, msg->flags);
 
        /* Pack data */
 
        if (msg->len == 0)
-               len += tdb_pack(buf + len, buflen - len, NULL, "dd",
+               len += tdb_pack(buf + len, buflen - len, "dd",
                                msg->notify.value[0], msg->notify.value[1]);
        else
-               len += tdb_pack(buf + len, buflen - len, NULL, "B",
+               len += tdb_pack(buf + len, buflen - len, "B",
                                msg->len, msg->notify.data);
 
        if (buflen != len) {