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
5b3ac9ca
Commit
5b3ac9ca
authored
Dec 02, 2013
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protobuf-c.c: wrap DO_ALLOC macro in a do {} while(0) statement
parent
3ec5aa12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+2
-1
No files found.
protobuf-c/protobuf-c.c
View file @
5b3ac9ca
...
...
@@ -92,6 +92,7 @@ alloc_failed_warning (unsigned size, const char *filename, unsigned line)
/* Try to allocate memory, running some special code if it fails. */
#define DO_ALLOC(dst, allocator, size, fail_code) \
do \
{ size_t da__allocation_size = (size); \
if (da__allocation_size == 0) \
dst = NULL; \
...
...
@@ -101,7 +102,7 @@ alloc_failed_warning (unsigned size, const char *filename, unsigned line)
alloc_failed_warning (da__allocation_size, __FILE__, __LINE__); \
fail_code; \
} \
}
}
while(0)
#define DO_UNALIGNED_ALLOC DO_ALLOC
/* placeholder */
...
...
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