Skip to content

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Oct 16, 2025

drivers: modem: sim7080: Fix invalid call to strtok_r

The second parameter to strtok_r cannot be null.
It is the separator strtok is meant to search for, and it is
not kept anywhere in the saved state (the saved state
is just a pointer to the next piece of the original string).


drivers: modem: sim7080: Fix missing prototype of strtok_r

strtok_r is a POSIX extension of string.h. To ensure this C library
header provides the prototype we need to define _POSIX_C_SOURCE.
So let's do so.

drivers: modem: sim7080: Remove orphan file

drivers/modem/simcom-sim7080.c is not built.
And the author indicates it was added to the tree in error.
Let's remove it.

Related #94929

strtok_r is a POSIX extension of string.h. To ensure this C library
header provides the prototype we need to define _POSIX_C_SOURCE.
So let's do so.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
The second parameter to strtok_r cannot be null.
It is the separator strtok is meant to search for, and it is
not kept anywhere in the saved state (the saved state
is just a pointer to the next piece of the original string).

Signed-off-by: Alberto Escolar Piedras <[email protected]>
@aescolar aescolar changed the title Simcom drivers: modem: sim7080: Fix two issues detected at build time in CI Oct 16, 2025
@aescolar aescolar requested a review from jhedberg October 16, 2025 12:11
@jhedberg jhedberg requested a review from cfriedt October 16, 2025 12:12
@aescolar
Copy link
Member Author

CC @lgehreke

@aescolar aescolar requested review from rerickson1 and removed request for cfriedt October 16, 2025 12:13
@aescolar aescolar marked this pull request as ready for review October 16, 2025 12:13
@aescolar aescolar requested a review from cfriedt October 16, 2025 12:13
@jhedberg jhedberg added the Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc. label Oct 16, 2025
jhedberg
jhedberg previously approved these changes Oct 16, 2025
Copy link
Contributor

@lgehreke lgehreke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also delete drivers/modem/simcom-sim7080.c. This was re-added through a faulty rebase

drivers/modem/simcom-sim7080.c is not built.
And the author indicates it was added to the tree in error.
Let's remove it.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
@sonarqubecloud
Copy link

@jhedberg jhedberg merged commit 499f23f into zephyrproject-rtos:main Oct 16, 2025
30 checks passed
@aescolar aescolar deleted the simcom branch October 16, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Modem Drivers Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants