Commit 353c863
authored
Fix close error message (#433)
From the macOS manpage:
> Upon successful completion, a value of 0 is returned. Otherwise, a value
> of -1 is returned and the global integer variable errno is set to
> indicate the error.
I'm not certain whether the existing code may be there for cross-platform support, so I changed it to check for -1 and only then consult the global `errno`. This should preserve existing behavior if there's a cross-platform angle here.
rdar://1178615431 parent 13dc95b commit 353c863
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
| |||
0 commit comments