From: Dave Hayden (dave_at_xpedite.com)
Date: Wed Oct 07 1998 - 20:43:00 BST
> From M.T.Russell_at_ukc.ac.uk Wed Oct 7 13:59:23 1998
> To: ups-users_at_ukc.ac.uk
> Cc: raber%wilma_at_kst.siemens.de
> Subject: Re: Disappearing breakpoints
> Date: Wed, 07 Oct 1998 14:40:06 +0000
> From: Mark Russell <M.T.Russell_at_ukc.ac.uk>
>
> >
> > if (unlink(get_temp_bpt_filename()) != 0)
> > errf("Can't unlink `%s'", get_temp_bpt_filename());
>
> This is a side issue, but all the errf() calls would be better
> written:
>
> errf("Can't unlink `%s': %m", get_temp_bpt_filename());
>
> ... so that you get told *why* the unlink failed. I know this is
> off-topic, but programs that tell you that something failed without
> saying why are a pet peeve of mine.
I agree (except that you're missing the argument for the "%m" (:->.
But do we really want ups to say "Can't unlink the file because it
doesn't exist."? How about:
if (unlink(get_temp_bpt_filename()) != 0 && errno != ENOENT)
errf("Can't unlink ... );
After all, if the file doesn't exist, then you don't care whether
the unlink failed.
Dave Hayden
>
> Mark (a former ups hacker)
>
This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:32 GMT