Skip to content

Commit 80954bd

Browse files
PK Chanrlubos
authored andcommitted
drivers: at_cmd: corrected warning in set_notification_handler().
Before: (handler != NULL) is wrong. Even if hander is NULL, it is also forgetting prior notification handler. After: (handler != notification_handler) should be right. Signed-off-by: PK Chan <[email protected]>
1 parent 125bb7f commit 80954bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/at_cmd/at_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ int at_cmd_write(const char *const cmd,
292292
void at_cmd_set_notification_handler(at_cmd_handler_t handler)
293293
{
294294
LOG_DBG("Setting notification handler to %p", handler);
295-
if ((notification_handler != NULL) && (handler != NULL)) {
295+
if (notification_handler != NULL && handler != notification_handler) {
296296
LOG_WRN("Forgetting prior notification handler %p",
297297
notification_handler);
298298
}

0 commit comments

Comments
 (0)