Path: utzoo!utgpu!watmath!att!rutgers!ucsd!usc!cs.utexas.edu!uunet!charyb!will From: will@charyb.COM (Will Crowder) Newsgroups: comp.lang.c Subject: Re: compare strings, strcmp Keywords: strcmp,strings Message-ID: <309@charyb.COM> Date: 16 Nov 89 19:05:59 GMT References: <4463@blake.acs.washington.edu> <11605@smoke.BRL.MIL> <308@charyb.COM> Reply-To: will@charyb.UUCP (Will Crowder) Organization: KFW Corporation, Newbury Park, CA Lines: 12 In article <308@charyb.COM> dan@charyb.UUCP (Dan Mick) writes: >In article <11605@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >>#define StrEq( a, b ) (*(a) == *(b) && strcmp( a, b ) == 0) >>/* UNSAFE */ > >Why the UNSAFE comment? This looks like utterly standard C to me... This macro is "unsafe" because the macro arguments a and b are used twice, hence possible side effect difficulties... Will