Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Blame | Last modification | View Log | RSS feed

#! /bin/sh /usr/share/dpatch/dpatch-run
## 30_spfd_check_unlink_failure.dpatch by Thomas Jacob <jacob@internet24.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix a call to unlink() in spfd.c. It passed 'path < 0' as the argument 
## DP: instead of checking whether the return value < 0.

@DPATCH@

--- libspf2-1.2.5/src/spfd/spfd.c       2005-02-19 03:40:35.000000000 +0100
+++ libspf2-1.2.5-amd64/src/spfd/spfd.c 2007-03-08 21:17:09.000000000 +0100
@@ -640,7 +640,7 @@
        memset(&addr, 0, sizeof(addr));
        addr.sun_family = AF_UNIX;
        strcpy(addr.sun_path, spfd_config.path);
-       if (unlink(spfd_config.path < 0)) {
+       if (unlink(spfd_config.path) < 0) {
                if (errno != ENOENT) {
                        perror("unlink");
                        DIE("Failed to unlink socket");