Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | magnus | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
2 | ## 30_spfd_check_unlink_failure.dpatch by Thomas Jacob <jacob@internet24.de> |
||
3 | ## |
||
4 | ## All lines beginning with `## DP:' are a description of the patch. |
||
5 | ## DP: Fix a call to unlink() in spfd.c. It passed 'path < 0' as the argument |
||
6 | ## DP: instead of checking whether the return value < 0. |
||
7 | |||
8 | @DPATCH@ |
||
9 | |||
10 | --- libspf2-1.2.5/src/spfd/spfd.c 2005-02-19 03:40:35.000000000 +0100 |
||
11 | +++ libspf2-1.2.5-amd64/src/spfd/spfd.c 2007-03-08 21:17:09.000000000 +0100 |
||
12 | @@ -640,7 +640,7 @@ |
||
13 | memset(&addr, 0, sizeof(addr)); |
||
14 | addr.sun_family = AF_UNIX; |
||
15 | strcpy(addr.sun_path, spfd_config.path); |
||
16 | - if (unlink(spfd_config.path < 0)) { |
||
17 | + if (unlink(spfd_config.path) < 0) { |
||
18 | if (errno != ENOENT) { |
||
19 | perror("unlink"); |
||
20 | DIE("Failed to unlink socket"); |