Skip to content

Commit 36fe97f

Browse files
moonlight83340danieldegrasse
authored andcommitted
samples: net: mqtt_sn_publisher: Remove shadowed variable
Avoids shadowing the outer 'err' variable by reusing it instead of redeclaring it inside a conditional block. This improves code readability. Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
1 parent 404c43a commit 36fe97f

File tree

1 file changed

+0
-1
lines changed
  • samples/net/mqtt_sn_publisher/src

1 file changed

+0
-1
lines changed

samples/net/mqtt_sn_publisher/src/udp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ static void process_thread(void)
148148
if (IS_ENABLED(CONFIG_NET_SAMPLE_MQTT_SN_STATIC_GATEWAY)) {
149149
LOG_INF("Adding predefined Gateway");
150150
struct sockaddr_in gwaddr = {0};
151-
int err;
152151

153152
LOG_DBG("Parsing Broadcast IP %s", SAMPLE_GW_IP);
154153
gwaddr.sin_family = AF_INET;

0 commit comments

Comments
 (0)