hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/scripts/dtc/data.c
....@@ -1,21 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * (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
194 */
205
216 #include "dtc.h"
....@@ -74,7 +59,8 @@
7459 struct data d;
7560 char *q;
7661
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);
7864
7965 q = d.val;
8066 while (i < len) {
....@@ -94,6 +80,7 @@
9480 {
9581 struct data d = empty_data;
9682
83
+ d = data_add_marker(d, TYPE_NONE, NULL);
9784 while (!feof(f) && (d.len < maxlen)) {
9885 size_t chunksize, ret;
9986