Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!tumuc!guug!ott From: ott@guug.guug.de (Joachim Ott Munich-Germany) Newsgroups: comp.unix.questions Subject: Re: Strcpy on SysV vs. BSD. Summary: use lint Message-ID: <140@guug.guug.de> Date: 2 Sep 90 23:48:08 GMT References: <24351@adm.BRL.MIL> Sender: ott@guug.guug.de (Joachim Ott Munich-Germany) Organization: GUUG e.V., Munich, W.-Germany Lines: 14 In article <24351@adm.BRL.MIL>, hsw@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@guug.guug.de