>On Wed, Jan 02, 2002 at 08:22:20PM +0100, zoppiat_private wrote: >> Hi, i've implemented this function as part of my bondlog package: > >... > >> unsigned char *stream; >> >> if ((stream = (char *) malloc (11)) == NULL) > >No biggy, but looks nicer if you would cast to unsigned char *. You should not cast the return value from malloc() in C. If you forget top include <stdlib.h>, the cast will suppress the warning from the compiler about converting an integer to a pointer. (And in a 64 bit Solaris app. the code would actually break) Casper
This archive was generated by hypermail 2b30 : Fri Jan 04 2002 - 10:54:24 PST