diff options
Diffstat (limited to 'scripts/kconfig/zconf.l')
| -rw-r--r-- | scripts/kconfig/zconf.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 00f9d3a9cf8b..6555a475453b 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
| @@ -40,7 +40,7 @@ static void zconf_endfile(void); | |||
| 40 | 40 | ||
| 41 | static void new_string(void) | 41 | static void new_string(void) |
| 42 | { | 42 | { |
| 43 | text = malloc(START_STRSIZE); | 43 | text = xmalloc(START_STRSIZE); |
| 44 | text_asize = START_STRSIZE; | 44 | text_asize = START_STRSIZE; |
| 45 | text_size = 0; | 45 | text_size = 0; |
| 46 | *text = 0; | 46 | *text = 0; |
| @@ -62,7 +62,7 @@ static void append_string(const char *str, int size) | |||
| 62 | 62 | ||
| 63 | static void alloc_string(const char *str, int size) | 63 | static void alloc_string(const char *str, int size) |
| 64 | { | 64 | { |
| 65 | text = malloc(size + 1); | 65 | text = xmalloc(size + 1); |
| 66 | memcpy(text, str, size); | 66 | memcpy(text, str, size); |
| 67 | text[size] = 0; | 67 | text[size] = 0; |
| 68 | } | 68 | } |
| @@ -288,7 +288,7 @@ void zconf_initscan(const char *name) | |||
| 288 | exit(1); | 288 | exit(1); |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | current_buf = malloc(sizeof(*current_buf)); | 291 | current_buf = xmalloc(sizeof(*current_buf)); |
| 292 | memset(current_buf, 0, sizeof(*current_buf)); | 292 | memset(current_buf, 0, sizeof(*current_buf)); |
| 293 | 293 | ||
| 294 | current_file = file_lookup(name); | 294 | current_file = file_lookup(name); |
| @@ -299,7 +299,7 @@ void zconf_nextfile(const char *name) | |||
| 299 | { | 299 | { |
| 300 | struct file *iter; | 300 | struct file *iter; |
| 301 | struct file *file = file_lookup(name); | 301 | struct file *file = file_lookup(name); |
| 302 | struct buffer *buf = malloc(sizeof(*buf)); | 302 | struct buffer *buf = xmalloc(sizeof(*buf)); |
| 303 | memset(buf, 0, sizeof(*buf)); | 303 | memset(buf, 0, sizeof(*buf)); |
| 304 | 304 | ||
| 305 | current_buf->state = YY_CURRENT_BUFFER; | 305 | current_buf->state = YY_CURRENT_BUFFER; |
