Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
e2d45cbe
Commit
e2d45cbe
authored
Dec 12, 2015
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protobuf-c.c: Fix undefined code in zigzag functions
parent
565f42d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+4
-4
No files found.
protobuf-c/protobuf-c.c
View file @
e2d45cbe
...
@@ -311,9 +311,9 @@ static inline uint32_t
...
@@ -311,9 +311,9 @@ static inline uint32_t
zigzag32
(
int32_t
v
)
zigzag32
(
int32_t
v
)
{
{
if
(
v
<
0
)
if
(
v
<
0
)
return
(
(
uint32_t
)
(
-
v
)
)
*
2
-
1
;
return
(
-
(
uint32_t
)
v
)
*
2
-
1
;
else
else
return
v
*
2
;
return
(
uint32_t
)(
v
)
*
2
;
}
}
/**
/**
...
@@ -376,9 +376,9 @@ static inline uint64_t
...
@@ -376,9 +376,9 @@ static inline uint64_t
zigzag64
(
int64_t
v
)
zigzag64
(
int64_t
v
)
{
{
if
(
v
<
0
)
if
(
v
<
0
)
return
(
(
uint64_t
)
(
-
v
)
)
*
2
-
1
;
return
(
-
(
uint64_t
)
v
)
*
2
-
1
;
else
else
return
v
*
2
;
return
(
uint64_t
)(
v
)
*
2
;
}
}
/**
/**
...
...
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