Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
0f4f3c67
Commit
0f4f3c67
authored
Dec 12, 2011
by
Lucio De Re
Committed by
Russ Cox
Dec 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: avoid 0-length C array
R=golang-dev, ality CC=golang-dev, rsc
https://golang.org/cl/5467066
parent
2c2a582a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lex.c
src/cmd/gc/lex.c
+3
-2
No files found.
src/cmd/gc/lex.c
View file @
0f4f3c67
...
...
@@ -38,6 +38,7 @@ static struct {
int
*
val
;
}
exper
[]
=
{
// {"rune32", &rune32},
{
nil
,
nil
},
};
static
void
...
...
@@ -45,7 +46,7 @@ addexp(char *s)
{
int
i
;
for
(
i
=
0
;
i
<
nelem
(
exper
)
;
i
++
)
{
for
(
i
=
0
;
exper
[
i
].
name
!=
nil
;
i
++
)
{
if
(
strcmp
(
exper
[
i
].
name
,
s
)
==
0
)
{
*
exper
[
i
].
val
=
1
;
return
;
...
...
@@ -75,7 +76,7 @@ expstring(void)
static
char
buf
[
512
];
strcpy
(
buf
,
"X"
);
for
(
i
=
0
;
i
<
nelem
(
exper
)
;
i
++
)
for
(
i
=
0
;
exper
[
i
].
name
!=
nil
;
i
++
)
if
(
*
exper
[
i
].
val
)
seprint
(
buf
+
strlen
(
buf
),
buf
+
sizeof
buf
,
",%s"
,
exper
[
i
].
name
);
if
(
strlen
(
buf
)
==
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment