Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

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

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:03:09

On Sun, Nov 30, 2014 at 9:41 AM, David Michael [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help