commit 7e7c1e4c1dd8fa7492c8e247bb9829c043c50723 from: Stefan Sperling date: Sat Jan 12 20:11:48 2019 UTC avoid pointless call to got_error_from_errno() commit - 1beed9999fbf48508ec7047066ffd0c856eb9a28 commit + 7e7c1e4c1dd8fa7492c8e247bb9829c043c50723 blob - cedb4c631ede7a972c61fdd54ecbacaf59798356 blob + 45ace73306c72d723185ef208bb2d4b51fd09546 --- lib/worktree.c +++ lib/worktree.c @@ -526,7 +526,6 @@ install_blob(struct got_worktree *worktree, struct got fd = open(ondisk_path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE); if (fd == -1) { - err = got_error_from_errno(); if (errno == EEXIST) { struct stat sb; if (lstat(ondisk_path, &sb) == -1) { @@ -544,7 +543,7 @@ install_blob(struct got_worktree *worktree, struct got update = 1; } } else - return err; + return got_error_from_errno(); } (*progress_cb)(progress_arg,