Eric Blake <[EMAIL PROTECTED]> wrote:

> According to Jim Meyering on 8/14/2008 6:12 AM:
> |> | +      error (0, errno, _("cannot create temporary file in %s"),
> |> | +             quote (temp_dir));
> |> | +      exit (SORT_FAILURE);
> |> | +    }
> |>
> |> Why not the single statement error (SORT_FAILURE, errno, _(...))?
> |
> | Without the file or directory name, it's harder
> | to determine which file system is in question.
>
> But that doesn't answer my question.  error(SORT_FAILURE,...) will call
> exit(SORT_FAILURE) on your behalf, since SORT_FAILURE is non-zero.  In
> other words, why not let error() do the exiting, for less code on your side?

Ahh... I misinterpreted the "))" as the suggested change,
and didn't notice the s/0/SORT_FAILURE/ part.

There, you're absolutely right.
I blindly copied those two statements from the definition of die.
In this context, there's no need for the explicit exit.

Thanks!


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to