linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] mesh: Fix check for mkdir return value
@ 2020-11-29  5:18 Inga Stotland
  2020-11-29  5:28 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Inga Stotland @ 2020-11-29  5:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, sbrown, Inga Stotland

This correctly interprets the return value of mkdir():
0 for success.
---
 mesh/keyring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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++) {
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [BlueZ] mesh: Fix check for mkdir return value
  2020-11-29  5:18 [PATCH BlueZ] mesh: Fix check for mkdir return value Inga Stotland
@ 2020-11-29  5:28 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2020-11-29  5:28 UTC (permalink / raw)
  To: linux-bluetooth, inga.stotland

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-29  5:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-29  5:18 [PATCH BlueZ] mesh: Fix check for mkdir return value Inga Stotland
2020-11-29  5:28 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).