]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/adsp_Open.c
xnu-2050.48.11.tar.gz
[apple/xnu.git] / bsd / netat / adsp_Open.c
index f68b624e3fac0d63eb738d189b2756c2e7277371..b41ee11986e36ab4d7a5f78c9e5d7d59b0d1174f 100644 (file)
@@ -1,23 +1,29 @@
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /* adspOpen.c v01.20
  *
@@ -47,6 +53,8 @@
 #include <netat/adsp.h>
 #include <netat/adsp_internal.h>
 
+extern int *adsp_pidM;
+
 
 /*
  * NextCID
@@ -58,7 +66,8 @@
  * OUTPUTS:
  *             unique connection ID
  */
-unsigned short NextCID()
+
+unsigned short NextCID(void)
 {
        unsigned short num;
        register CCB *queue;
@@ -129,8 +138,6 @@ int adspOpen(sp, pb)                /* (DSPPBPtr pb) */
     register CCBPtr sp;
     register struct adspcmd *pb;
 {
-    extern int adsp_pidM[];
-
     int ocMode;
     register gbuf_t *mp;
 
@@ -257,7 +264,7 @@ int adspOpen(sp, pb)                /* (DSPPBPtr pb) */
        
     if (ocMode == ocEstablish) { /* For establish call, we're done */
        pb->ioResult = 0;
-       adspioc_ack(0, pb->ioc, pb->gref);
+       adspioc_ack(0, (gbuf_t *)pb->ioc, pb->gref);
        return 0;
     }
     
@@ -269,7 +276,7 @@ int adspOpen(sp, pb)                /* (DSPPBPtr pb) */
            return ENOBUFS;
     }
     pb->ioResult = 1;  /* not open -> not done */
-    adspioc_ack(0, pb->ioc, pb->gref); /* release user */
+    adspioc_ack(0, (gbuf_t *)pb->ioc, pb->gref); /* release user */
     sp->opb = (struct adspcmd *)gbuf_rptr(mp);
     sp->opb->ioc = 0;          /* unlink saved pb from ioctl block */
     sp->opb->mp = mp;