mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 07:18:08 +02:00
test: set the umask before msktemp to silence coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
817328e171
commit
592b6d2cb7
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <libinput.h>
|
#include <libinput.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "litest.h"
|
#include "litest.h"
|
||||||
|
|
@ -131,6 +132,7 @@ START_TEST(path_create_invalid_file)
|
||||||
char path[] = "/tmp/litest_path_XXXXXX";
|
char path[] = "/tmp/litest_path_XXXXXX";
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
umask(002);
|
||||||
fd = mkstemp(path);
|
fd = mkstemp(path);
|
||||||
ck_assert_int_ge(fd, 0);
|
ck_assert_int_ge(fd, 0);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue