summaryrefslogtreecommitdiffstats
path: root/utils/stlink/patches/020-calloc.patch
blob: ef06b691a9df9146786b23f062f9460c4ee4326c (plain)
1
2
3
4
5
6
7
8
9
10
11
--- 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) {