vserver 1.9.3
[linux-2.6.git] / drivers / isdn / hardware / eicon / capifunc.c
index ba5dc75..5c138a3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: capifunc.c,v 1.61.4.2 2004/05/05 16:09:25 armin Exp $
+/* $Id: capifunc.c,v 1.61.4.5 2004/08/27 20:10:12 armin Exp $
  *
  * ISDN interface module for Eicon active cards DIVA.
  * CAPI Interface common functions
@@ -228,7 +228,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
        word length = 12, dlength = 0;
        byte *write;
        CAPI_MSG msg;
-       byte *string = 0;
+       byte *string = NULL;
        va_list ap;
        diva_os_message_buffer_s *dmb;
        diva_card *card = NULL;
@@ -998,7 +998,8 @@ static u16 diva_send_message(struct capi_ctr *ctrl,
 
       write_end:
        diva_os_leave_spin_lock(&api_lock, &old_irql, "send message");
-       diva_os_free_message_buffer(dmb);
+       if (retval == CAPI_NOERROR)
+               diva_os_free_message_buffer(dmb);
        return retval;
 }
 
@@ -1072,7 +1073,7 @@ static int divacapi_connect_didd(void)
                        req.didd_notify.e.Rc =
                            IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
                        req.didd_notify.info.callback = (void *)didd_callback;
-                       req.didd_notify.info.context = 0;
+                       req.didd_notify.info.context = NULL;
                        DAdapter.request((ENTITY *) & req);
                        if (req.didd_notify.e.Rc != 0xff) {
                                stop_dbg();