Skip to content

Commit

Permalink
fixup! sys/string_utils: add string_writer helper
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Dec 16, 2024
1 parent 613a14e commit 397bca5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/include/string_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <strings.h>
#include <sys/types.h>

#include "flash_utils.h"
#include "modules.h"

#ifndef STRING_UTILS_H
Expand Down Expand Up @@ -98,7 +99,8 @@ static inline const char *string_writer_str(const string_writer_t *sw)
* @return number of bytes written on success
* -E2BIG if the string was truncated
*/
int swprintf(string_writer_t *sw, const char *restrict format, ...);
__attribute__ ((format (printf, 2, 3)))
int swprintf(string_writer_t *sw, FLASH_ATTR const char *restrict format, ...);

/* explicit_bzero is provided if:
* - glibc is used as C lib (only with board natvie)
Expand Down

0 comments on commit 397bca5

Please sign in to comment.