Strcpy on SysV vs. BSD.

Joachim Ott Munich-Germany ott at guug.guug.de
Mon Sep 3 09:48:08 AEST 1990


In article <24351 at adm.BRL.MIL>, hsw at sparta.com (Howard Weiss) writes:
> ...
> main(){
>   char *TTx = "/dev/";
>   char tty[10]; /* works on both SysV and BSD */
> /*  char *tty;	/* works only on BSD */
> 
> ...

As Greg Hunt already said, the pointer 'char *tty' contains a random-
value. lint would have said 'warning: tty may be used before set'.
Obviously you do not use lint, try do it from now on.

Joachim Ott	ott at guug.guug.de



More information about the Comp.unix.questions mailing list