Date: Sun, 2 Mar 2003 16:35:59 +0100 (CET) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: Jens Rehsack <rehsack@liwing.de> Cc: Barney Wolff <barney@pit.databus.com>, Juli Mallett <jmallett@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: PATCH: type errors in src-tree Message-ID: <20030302163339.G2174@beagle.fokus.gmd.de> In-Reply-To: <3E615F83.7090106@liwing.de> References: <3E5EA13E.9020208@liwing.de> <3E60F1CF.2030400@liwing.de> <20030301155546.A39174@FreeBSD.org> <3E612F7F.1090002@liwing.de> <20030301233642.GA64401@pit.databus.com> <3E614A06.5070403@liwing.de> <20030301180920.A53976@FreeBSD.org> <3E61560D.2070205@liwing.de> <20030302012530.GA65162@pit.databus.com> <3E615F83.7090106@liwing.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 Mar 2003, Jens Rehsack wrote: JR>Barney Wolff wrote: JR>> This is an example of what I was pointing out: JR>> JR>> On Sun, Mar 02, 2003 at 01:53:33AM +0100, Jens Rehsack wrote: JR>> ... JR>> JR>>>@@ -1444,22 +1420,19 @@ JR>>> * none - response sent JR>>> * JR>>> */ JR>>>-void JR>>>-send_resp ( intf, Hdr, resp ) JR>>>- int intf; JR>>>- Snmp_Header *Hdr; JR>>>- u_char *resp; JR>>>+static void JR>>>+send_resp ( const int intf, Snmp_Header *Hdr, char *resp ) JR>>> { JR>>> int n; JR>>> JR>>>- if ( ilmi_fd[intf] > 0 ) { JR>>>- n = write ( ilmi_fd[intf], (caddr_t)&resp[1], resp[0] ); JR>>>+ if ( ilmi_fd[intf] > 0 ) { /* FIXME: does ilmi_fd[intf] exists? out of range? */ JR>>>+ n = write ( ilmi_fd[intf], resp+1, resp[0] ); JR>> JR>> ... JR>> JR>> Here's a case where it matters whether something is u_char or char. JR>> write(2) takes a size_t as its third arg, and extension of a char to JR>> that may not be the same as for u_char, for example on Sparc. If the JR>> response is ever >127 bytes, this will fail. You're going to have to JR>> look carefully at how things are used to see when char is appropriate JR>> and when u_char is necessary. JR>> JR> JR>That is really right, but for those check I have to know more 'bout ATM, JR>right? I just have detected some compiler errors using JR>-finline-functions (yes, I'm playing with optimization options :-)). If JR>you know a real good online-reference, one fine day I'll check it and JR>check the entire ilmid.c code for valid signment. Go to www.atmforum.com and look at the Standards page. You will find the ILMI 4.0 standard there. But beware, if you are not used to read telecommunication standards, you will be confused :-) For ILMI you will also need the relavant SNMP RFCs and, maybe, the ASN.1 doc (don't remember exactly should be one of the Z.* ITU-T standards). harti JR> JR>Jens JR> JR> JR>To Unsubscribe: send mail to majordomo@FreeBSD.org JR>with "unsubscribe freebsd-current" in the body of the message JR> -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030302163339.G2174>