Re: [PATCH] compat: convert modes to use portable file type values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 30, 2014 at 9:41 AM, David Michael <fedora.dm0@xxxxxxxxx> wrote:
> +int git_stat(const char *path, struct stat *buf)
> +{
> +       int rc;
> +       rc = stat(path, buf);
> +       if (buf != NULL)

It's a minor thing, but maybe test "!rc" instead of "buf != NULL"?

> +               buf->st_mode = mode_native_to_git(buf->st_mode);
> +       return rc;
> +}
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]