Re: [PATCH] compat: convert modes to use portable file type values
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Dec 1, 2014, 14:44 UTC
- Message-ID
- <CACsJy8CKEwOVcB_MUaK8mmSmQuKHC6R6K0YymjCrTP3aYFdbPg@mail.gmail.com>
- In-Reply-To
- <87vblxl8ah.fsf@gmail.com>
On Sun, Nov 30, 2014 at 9:41 AM, David Michael <fedora.dm0@gmail.com> wrote:
Show 5 quoted lines
> +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