Article View: comp.sources.d
Article #1776Re: v01INF1: Status - Status of comp.sources.reviewed
From: Kent Forschmiedt
Date: Tue, 23 Apr 1991 16:34
Date: Tue, 23 Apr 1991 16:34
27 lines
1302 bytes
1302 bytes
In article <MEISSNER.91Apr20151434@curley.osf.org> meissner@osf.org (Michael Meissner) writes:
> This can produce the wrong error message if sprintf sets errno (for
> example if it calls malloc and malloc fails).
In article <6_WAABB@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes:
>
>I don't know of any implementations where sprintf can set errno.
>Does *anyone* know of one?
Who cares? If there is one, or somebody someday makes one, somebody will
eventually be bitten. Many years ago, I began adding two lines of code to
my versions of these functions, and stopped losing sleep.
errorthing(char *whatever)
{
char buf[200];
int etmp = errno;
/* whatever */
errno = etmp;
perror(buf);
}
--
Kent Forschmiedt ... kentfo@polari ... uw-beaver!sumax!polari!kentfo
Technical Details
Message-ID:
<3840@polari.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!sumax!polari!kentfoReferences:
<B9UA6DD@xds13.ferranti.com> <MEISSNER.91Apr20151434@curley.osf.org> <6_WAABB@xds13.ferranti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!sumax!polari!kentfo From: kentfo@polari.UUCP (Kent Forschmiedt) Newsgroups: comp.sources.d Subject: Re: v01INF1: Status - Status of comp.sources.reviewed Message-ID: <3840@polari.UUCP> Date: 23 Apr 91 16:34:08 GMT References: <B9UA6DD@xds13.ferranti.com> <MEISSNER.91Apr20151434@curley.osf.org> <6_WAABB@xds13.ferranti.com> Organization: Seattle Online Public Unix (206) 328-4944 Lines: 27