Skip to content

Commit 65b616f

Browse files
JordanYatesjhedberg
authored andcommitted
net: conn_mgr: connectivity: replace !binding
Replace all `!binding` checks with `binding == NULL` for MISRA compliance. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent cfe0a68 commit 65b616f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

subsys/net/conn_mgr/conn_mgr_connectivity.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int conn_mgr_if_connect(struct net_if *iface)
2323
LOG_DBG("iface %p connect", iface);
2424

2525
binding = conn_mgr_if_get_binding(iface);
26-
if (!binding) {
26+
if (binding == NULL) {
2727
return -ENOTSUP;
2828
}
2929

@@ -60,7 +60,7 @@ int conn_mgr_if_disconnect(struct net_if *iface)
6060
LOG_DBG("iface %p disconnect", iface);
6161

6262
binding = conn_mgr_if_get_binding(iface);
63-
if (!binding) {
63+
if (binding == NULL) {
6464
return -ENOTSUP;
6565
}
6666

@@ -108,7 +108,7 @@ int conn_mgr_if_get_opt(struct net_if *iface, int optname, void *optval, size_t
108108
}
109109

110110
binding = conn_mgr_if_get_binding(iface);
111-
if (!binding) {
111+
if (binding == NULL) {
112112
*optlen = 0;
113113
return -ENOTSUP;
114114
}
@@ -139,7 +139,7 @@ int conn_mgr_if_set_opt(struct net_if *iface, int optname, const void *optval, s
139139
}
140140

141141
binding = conn_mgr_if_get_binding(iface);
142-
if (!binding) {
142+
if (binding == NULL) {
143143
return -ENOTSUP;
144144
}
145145

@@ -166,7 +166,7 @@ int conn_mgr_if_set_flag(struct net_if *iface, enum conn_mgr_if_flag flag, bool
166166
}
167167

168168
binding = conn_mgr_if_get_binding(iface);
169-
if (!binding) {
169+
if (binding == NULL) {
170170
return -ENOTSUP;
171171
}
172172

@@ -184,7 +184,7 @@ bool conn_mgr_if_get_flag(struct net_if *iface, enum conn_mgr_if_flag flag)
184184
}
185185

186186
binding = conn_mgr_if_get_binding(iface);
187-
if (!binding) {
187+
if (binding == NULL) {
188188
return false;
189189
}
190190

@@ -196,7 +196,7 @@ int conn_mgr_if_get_timeout(struct net_if *iface)
196196
struct conn_mgr_conn_binding *binding = conn_mgr_if_get_binding(iface);
197197
int value;
198198

199-
if (!binding) {
199+
if (binding == NULL) {
200200
return false;
201201
}
202202

@@ -213,7 +213,7 @@ int conn_mgr_if_set_timeout(struct net_if *iface, int timeout)
213213
{
214214
struct conn_mgr_conn_binding *binding = conn_mgr_if_get_binding(iface);
215215

216-
if (!binding) {
216+
if (binding == NULL) {
217217
return -ENOTSUP;
218218
}
219219

0 commit comments

Comments
 (0)