| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
|---|
| 3 | | - * |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or |
|---|
| 6 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 7 | | - * published by the Free Software Foundation; either version 2 of the |
|---|
| 8 | | - * License, or (at your option) any later version. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 13 | | - * General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program; if not, write to the Free Software |
|---|
| 17 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|---|
| 18 | | - * USA |
|---|
| 19 | 4 | */ |
|---|
| 20 | 5 | |
|---|
| 21 | 6 | #include "dtc.h" |
|---|
| .. | .. |
|---|
| 74 | 59 | struct data d; |
|---|
| 75 | 60 | char *q; |
|---|
| 76 | 61 | |
|---|
| 77 | | - d = data_grow_for(empty_data, len + 1); |
|---|
| 62 | + d = data_add_marker(empty_data, TYPE_STRING, NULL); |
|---|
| 63 | + d = data_grow_for(d, len + 1); |
|---|
| 78 | 64 | |
|---|
| 79 | 65 | q = d.val; |
|---|
| 80 | 66 | while (i < len) { |
|---|
| .. | .. |
|---|
| 94 | 80 | { |
|---|
| 95 | 81 | struct data d = empty_data; |
|---|
| 96 | 82 | |
|---|
| 83 | + d = data_add_marker(d, TYPE_NONE, NULL); |
|---|
| 97 | 84 | while (!feof(f) && (d.len < maxlen)) { |
|---|
| 98 | 85 | size_t chunksize, ret; |
|---|
| 99 | 86 | |
|---|