Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
d57be38c
Commit
d57be38c
authored
Jul 10, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show: Sanitze repeated fields showing routine
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
f572bc4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
protobuf.c
protobuf.c
+7
-16
No files found.
protobuf.c
View file @
d57be38c
...
@@ -351,7 +351,6 @@ static void pb_show_repeated(const ProtobufCFieldDescriptor *fd, pb_pr_ctl_t *ct
...
@@ -351,7 +351,6 @@ static void pb_show_repeated(const ProtobufCFieldDescriptor *fd, pb_pr_ctl_t *ct
{
{
pb_pr_field_t
*
field
=
&
ctl
->
cur
;
pb_pr_field_t
*
field
=
&
ctl
->
cur
;
unsigned
long
counter
;
unsigned
long
counter
;
int
done
;
if
(
nr_fields
==
0
)
{
if
(
nr_fields
==
0
)
{
pr_msg
(
"<empty>"
);
pr_msg
(
"<empty>"
);
...
@@ -362,29 +361,21 @@ static void pb_show_repeated(const ProtobufCFieldDescriptor *fd, pb_pr_ctl_t *ct
...
@@ -362,29 +361,21 @@ static void pb_show_repeated(const ProtobufCFieldDescriptor *fd, pb_pr_ctl_t *ct
void
*
p
=
field
->
data
;
void
*
p
=
field
->
data
;
field
->
count
=
nr_fields
;
field
->
count
=
nr_fields
;
field
->
data
=
(
void
*
)(
*
(
long
*
)
p
);
for
(
counter
=
0
;
counter
<
nr_fields
;
counter
++
)
{
done
=
show
(
field
);
if
(
done
)
return
;
for
(
p
+=
fsize
,
counter
=
0
;
counter
<
nr_fields
-
1
;
counter
++
,
p
+=
fsize
)
{
pr_msg
(
":"
);
field
->
data
=
(
void
*
)(
*
(
long
*
)
p
);
field
->
data
=
(
void
*
)(
*
(
long
*
)
p
);
show
(
field
);
show
(
field
);
p
+=
fsize
;
}
}
return
;
return
;
}
}
field
->
count
=
nr_fields
;
field
->
count
=
nr_fields
;
done
=
show
(
field
);
for
(
counter
=
0
;
counter
<
nr_fields
;
counter
++
)
{
if
(
done
)
if
(
counter
)
return
;
pr_msg
(
":"
);
field
->
data
+=
fsize
;
for
(
counter
=
0
;
counter
<
nr_fields
-
1
;
counter
++
,
field
->
data
+=
fsize
)
{
pr_msg
(
":"
);
show
(
field
);
show
(
field
);
field
->
data
+=
fsize
;
}
}
}
}
...
...
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