diff mbox series

[BlueZ] mesh: Fix check for mkdir return value

Message ID 20201129051838.82091-1-inga.stotland@intel.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ] mesh: Fix check for mkdir return value | expand

Commit Message

Stotland, Inga Nov. 29, 2020, 5:18 a.m. UTC
This correctly interprets the return value of mkdir():
0 for success.
---
 mesh/keyring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

bluez.test.bot@gmail.com Nov. 29, 2020, 5:28 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=392789

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/mesh/keyring.c b/mesh/keyring.c
index 1ef4fc3ef..38b0152f7 100644
--- a/mesh/keyring.c
+++ b/mesh/keyring.c
@@ -51,7 +51,7 @@  bool keyring_put_net_key(struct mesh_node *node, uint16_t net_idx,
 
 	snprintf(key_file, PATH_MAX, "%s%s", node_path, net_key_dir);
 
-	if (!mkdir(key_file, 0755))
+	if (mkdir(key_file, 0755) != 0)
 		return false;
 
 	snprintf(key_file, PATH_MAX, "%s%s/%3.3x", node_path, net_key_dir,
@@ -88,7 +88,7 @@  bool keyring_put_app_key(struct mesh_node *node, uint16_t app_idx,
 
 	snprintf(key_file, PATH_MAX, "%s%s", node_path, app_key_dir);
 
-	if (!mkdir(key_file, 0755))
+	if (mkdir(key_file, 0755) != 0)
 		return false;
 
 	snprintf(key_file, PATH_MAX, "%s%s/%3.3x", node_path, app_key_dir,
@@ -207,7 +207,7 @@  bool keyring_put_remote_dev_key(struct mesh_node *node, uint16_t unicast,
 
 	snprintf(key_file, PATH_MAX, "%s%s", node_path, dev_key_dir);
 
-	if (!mkdir(key_file, 0755))
+	if (mkdir(key_file, 0755) != 0)
 		return false;
 
 	for (i = 0; i < count; i++) {