summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/openocd/patches/patch-src_flash_nor_sim3x_c22
1 files changed, 22 insertions, 0 deletions
diff --git a/package/openocd/patches/patch-src_flash_nor_sim3x_c b/package/openocd/patches/patch-src_flash_nor_sim3x_c
new file mode 100644
index 000000000..884b6f2c6
--- /dev/null
+++ b/package/openocd/patches/patch-src_flash_nor_sim3x_c
@@ -0,0 +1,22 @@
+--- openocd-0.9.0.orig/src/flash/nor/sim3x.c 2015-04-24 17:09:54.000000000 +0200
++++ openocd-0.9.0/src/flash/nor/sim3x.c 2016-04-24 17:17:47.000000000 +0200
+@@ -864,14 +864,12 @@ static int sim3x_flash_info(struct flash
+ return ERROR_BUF_TOO_SMALL;
+
+ /* Package */
+- if (sim3x_info->device_package) {
+- printed = snprintf(buf, buf_size, "-G%s", sim3x_info->device_package);
+- buf += printed;
+- buf_size -= printed;
++ printed = snprintf(buf, buf_size, "-G%s", sim3x_info->device_package);
++ buf += printed;
++ buf_size -= printed;
+
+- if (buf_size <= 0)
+- return ERROR_BUF_TOO_SMALL;
+- }
++ if (buf_size <= 0)
++ return ERROR_BUF_TOO_SMALL;
+ }
+ }
+