]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Remove conditional msg_ macro from util.c
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 21 May 2021 15:32:10 +0000 (16:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 21 May 2021 15:32:10 +0000 (16:32 +0100)
src/libutil/util.c

index 49d61e87e20e63d937b17f1115ac56908b872232..16c8c0f23f56e700669ca42850b6f90e761f3209 100644 (file)
@@ -1059,9 +1059,6 @@ rspamd_file_lock (gint fd, gboolean async)
                if (async && (errno == EAGAIN || errno == EACCES)) {
                        return FALSE;
                }
-               if (errno != ENOTSUP) {
-                       msg_warn ("lock on file failed: %s", strerror (errno));
-               }
 
                return FALSE;
        }
@@ -1084,9 +1081,6 @@ rspamd_file_unlock (gint fd, gboolean async)
                        return FALSE;
                }
 
-               if (errno != ENOTSUP) {
-                       msg_warn ("unlock on file failed: %s", strerror (errno));
-               }
                return FALSE;
        }
 
@@ -1924,9 +1918,11 @@ rspamd_file_xopen (const char *fname, int oflags, guint mode,
 #endif
 
 #ifndef HAVE_OCLOEXEC
+       int serrno;
        if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
-               msg_warn ("fcntl failed: %d, '%s'", errno, strerror (errno));
+               serrno = errno;
                close (fd);
+               errno = serrno;
 
                return -1;
        }