Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
5caaeab8
Commit
5caaeab8
authored
Mar 22, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
antithread: avoid arithmetic on void pointers
parent
caf36699
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
ccan/antithread/antithread.c
ccan/antithread/antithread.c
+1
-1
ccan/failtest/failtest.c
ccan/failtest/failtest.c
+2
-1
No files found.
ccan/antithread/antithread.c
View file @
5caaeab8
...
...
@@ -193,7 +193,7 @@ struct at_pool *at_pool(unsigned long size)
/* Then we remap into the middle of it. */
munmap
(
p
->
pool
,
size
+
PADDING
);
p
->
pool
=
mmap
(
p
->
pool
+
PADDING
/
2
,
size
,
PROT_READ
|
PROT_WRITE
,
p
->
pool
=
mmap
(
(
char
*
)
p
->
pool
+
PADDING
/
2
,
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
if
(
p
->
pool
==
MAP_FAILED
)
goto
fail_free
;
...
...
ccan/failtest/failtest.c
View file @
5caaeab8
...
...
@@ -84,8 +84,9 @@ static struct failtest_call *add_history_(enum failtest_call_type type,
#define add_history(type, file, line, elem) \
add_history_((type), (file), (line), (elem), sizeof(*(elem)))
/* We do a fake call inside a sizeof(), to check types. */
#define set_cleanup(call, clean, type) \
(call)->cleanup = (void *)((void)sizeof(clean((type *)NULL)), (clean))
(call)->cleanup = (void *)((void)sizeof(clean((type *)NULL)
,1
), (clean))
static
bool
read_write_info
(
int
fd
)
{
...
...
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