We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b265061 + 599d223 commit a070d62Copy full SHA for a070d62
csum-file.c
@@ -130,14 +130,10 @@ struct sha1file *sha1fd_check(const char *name)
130
131
sink = open("/dev/null", O_WRONLY);
132
if (sink < 0)
133
- return NULL;
+ die_errno("unable to open /dev/null");
134
check = open(name, O_RDONLY);
135
- if (check < 0) {
136
- int saved_errno = errno;
137
- close(sink);
138
- errno = saved_errno;
139
140
- }
+ if (check < 0)
+ die_errno("unable to open '%s'", name);
141
f = sha1fd(sink, name);
142
f->check_fd = check;
143
return f;
0 commit comments