On Mon, Sep 24, 2012 at 09:12:01PM +0200, Waldemar Brodkorb wrote:
> +        if (access(filename, R_OK | W_OK) == -1) {
> +                c=open(filename, O_WRONLY | O_CREAT, 0664);
> +                if (c > 0) {

0 is a perfectly valid file descriptor. This should be c >= 0, or
just use xopen().

> +                        close(c);
> +                }
> +        }

>>> Dan
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to