summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-08 07:30:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-08 07:30:42 (GMT)
commit008001c3b5e35ff3c122f2eb1bf566d93746b172 (patch)
tree05eaa4cd225bf56fea6516e29701009a862e79dd
parent7e8c940ac114ea986ce22a24a142df025e0b1bbb (diff)
downloadtcl-008001c3b5e35ff3c122f2eb1bf566d93746b172.zip
tcl-008001c3b5e35ff3c122f2eb1bf566d93746b172.tar.gz
tcl-008001c3b5e35ff3c122f2eb1bf566d93746b172.tar.bz2
More TCLFLEXARRAY usage
-rw-r--r--generic/tclPkg.c2
-rw-r--r--generic/tclTrace.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index fd45cc1..bfe1c66 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -40,7 +40,7 @@ typedef struct PkgAvail {
typedef struct PkgName {
struct PkgName *nextPtr; /* Next in list of package names being
* initialized. */
- char name[1];
+ char name[TCLFLEXARRAY];
} PkgName;
typedef struct PkgFiles {
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 0c243a6..bed5084 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -22,7 +22,7 @@ typedef struct {
int flags; /* Operations for which Tcl command is to be
* invoked. */
size_t length; /* Number of non-NUL chars. in command. */
- char command[1]; /* Space for Tcl command to invoke. Actual
+ char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
* size will be as large as necessary to hold
* command. This field must be the last in the
* structure, so that it can be larger than 1
@@ -56,7 +56,7 @@ typedef struct {
* deleted too early. Keeps track of how many
* pieces of code have a pointer to this
* structure. */
- char command[1]; /* Space for Tcl command to invoke. Actual
+ char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
* size will be as large as necessary to hold
* command. This field must be the last in the
* structure, so that it can be larger than 1