diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2021-10-18 10:28:33 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-10-18 15:31:55 -0700 |
commit | 1b0374157c92f3256f1a4d0e69489486ca3f4508 (patch) | |
tree | 086ecbe6c5b9c456ad2106a0c60e1274e4a3d0fa /peripheral | |
parent | 96ffb02e2b4dd45a8b35b19b27776a1ce89d1ee0 (diff) | |
download | bluez-1b0374157c92f3256f1a4d0e69489486ca3f4508.tar.gz |
peripheral: Fix unchecked return value
This patch fixes the unchecked return value(CWE-252) issues reported by
the Coverity.
Diffstat (limited to 'peripheral')
-rw-r--r-- | peripheral/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/peripheral/main.c b/peripheral/main.c index 6ce729178..86b52236e 100644 --- a/peripheral/main.c +++ b/peripheral/main.c @@ -77,7 +77,8 @@ static void prepare_filesystem(void) if (lstat(mount_table[i].target, &st) < 0) { printf("Creating %s\n", mount_table[i].target); - mkdir(mount_table[i].target, 0755); + if (mkdir(mount_table[i].target, 0755) < 0) + perror("Failed to create dir"); } printf("Mounting %s to %s\n", mount_table[i].fstype, |