]> mj.ucw.cz Git - libucw.git/commitdiff
fb-param: Fixed a typo found by warnings in newer GCC
authorMartin Mares <mj@ucw.cz>
Tue, 21 Feb 2017 21:59:08 +0000 (22:59 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 21 Feb 2017 21:59:08 +0000 (22:59 +0100)
ucw/fb-param.c

index 21bbeb63d5756e07b8a928250c37940676957d75..3bc5a97301fb4b0531c4024fcb9823bd33bfcf20 100644 (file)
@@ -90,7 +90,7 @@ bopen_fd_internal(int fd, struct fb_params *params, uint mode, const char *name)
            params->buffer_size ? : fbpar_def.buffer_size,
            params->read_ahead ? : fbpar_def.read_ahead,
            params->write_back ? : fbpar_def.write_back);
-       if (!~mode && !fbdir_cheat && ((int)(mode = fcntl(fd, F_GETFL)) < 0 || fcntl(fd, F_SETFL, mode | O_DIRECT)) < 0)
+       if (!~mode && !fbdir_cheat && ((int)(mode = fcntl(fd, F_GETFL)) < 0 || fcntl(fd, F_SETFL, mode | O_DIRECT) < 0))
           msg(L_WARN, "Cannot set O_DIRECT on fd %d: %m", fd);
        return fb;
 #endif