0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/utils/stlink/patches/020-calloc.patch
Rosen Penev 41a5880f01 stlink: fix compilation with GCC 14
Switch to local git tarballs. Smaller.

Upstream backport and a local patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-05-14 16:38:21 -07:00

12 lines
300 B
Diff

--- a/src/stlink-lib/chipid.c
+++ b/src/stlink-lib/chipid.c
@@ -65,7 +65,7 @@ void process_chipfile(char *fname) {
return;
}
- ts = calloc(sizeof(struct stlink_chipid_params), 1);
+ ts = calloc(1, sizeof(struct stlink_chipid_params));
while (fgets(buf, sizeof(buf), fp) != NULL) {