Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!interlan.InterLan.COM!interlan.interlan.com!towfiq From: towfiq@FTP.COM (Mark Towfiq) Newsgroups: comp.sources.wanted Subject: Re: What is strdup() supposed to do? Does anyone have a copy? Message-ID: Date: 22 Feb 91 14:43:13 GMT References: <1991Feb14.050716.9501@shibaya.lonestar.org> <1991Feb17.045913.17126@sbcs.sunysb.edu> <1991Feb17.164731.7564@onion.rain.com> Sender: news@interlan.Interlan.COM (No News is BAD News) Reply-To: towfiq@FTP.COM Followup-To: comp.sources.wanted Organization: FTP Software, Inc., Wakefield, MA Lines: 22 In-Reply-To: guido@cwi.nl's message of 21 Feb 91 19:09:03 GMT Nntp-Posting-Host: ftp.com In article guido@cwi.nl (Guido van Rossum) writes: jeff@onion.rain.com (Jeff Beadles) writes: >Strcpy could also return an error, but I don't think that I've ever seen >someone check for it. :-) Actually, it is documented behaviour (at least on some systems) that it returns NULL when the malloc fails. I have written code that assumes this. I think you are confusing "strcpy" with "strdup". --Guido (what a silly thread this is!) Let's try to make it less silly by being careful in our posts. -- Mark Towfiq, FTP Software, Inc. towfiq@FTP.COM Work No.: +1 617 246 0900 Home No.: +1 617 488 2818 "The Earth is but One Country, and Mankind its Citizens" -- Baha'u'llah