usb: dwc3: fix NULL pointer issue
[oweals/u-boot.git] / tools / file2include.c
index e602f937f15603f94212980219151ed39c829e3c..775440cba9f1072e558494968b14a05eacd9e184 100644 (file)
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
-#include <malloc.h>
 
 /* Size of the blocks written to the compressed file */
 #define BLOCK_SIZE 8
@@ -84,7 +83,7 @@ int main(int argc, char *argv[])
                        printf("\\x%02x", buf[j]);
                printf("\"}, /* ");
                for (j = i; j < i + BLOCK_SIZE && j < count; ++j) {
-                       if (buf[j] >= 0x20 && buf[j] <= 0x7e)
+                       if (buf[j] != '*' && buf[j] >= 0x20 && buf[j] <= 0x7e)
                                printf("%c", buf[j]);
                        else
                                printf(".");