Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!gwyn@BRL.ARPA From: gwyn@BRL.ARPA (VLD/VMB) Newsgroups: net.unix Subject: Re: strdup Message-ID: <3342@brl-smoke.ARPA> Date: Wed, 27-Aug-86 12:27:11 EDT Article-I.D.: brl-smok.3342 Posted: Wed Aug 27 12:27:11 1986 Date-Received: Wed, 27-Aug-86 21:50:23 EDT Sender: news@brl-smoke.ARPA Lines: 10 As a point of information, strdup() is listed in the SVR3 manual. I'm not sure how useful it really is, since one still has to test the returned pointer to handle the out-of-memory situation. When I implement my own strdup() in an application, instead of returning NULL the function typically enters a termination routine. That way the main body of code remains simple and straightforward. The exact error handling approach is clearly application-specific; the problem with strdup() is that many programmers will not bother to test for failure, with the result of reduced code reliability.