Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
ZhouShuya
OpenXG-RAN
Commits
7576e3fa
Commit
7576e3fa
authored
Apr 24, 2018
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T: bugfix: fix check on return value of mmap
parent
184d51c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
common/utils/T/T.c
common/utils/T/T.c
+1
-1
common/utils/T/local_tracer.c
common/utils/T/local_tracer.c
+1
-1
No files found.
common/utils/T/T.c
View file @
7576e3fa
...
...
@@ -147,7 +147,7 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
if
(
T_shm_fd
==
-
1
)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
T_cache
=
mmap
(
NULL
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
),
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
T_shm_fd
,
0
);
if
(
T_cache
==
NULL
)
if
(
T_cache
==
MAP_FAILED
)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
close
(
T_shm_fd
);
...
...
common/utils/T/local_tracer.c
View file @
7576e3fa
...
...
@@ -335,7 +335,7 @@ static void init_shm(void)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
T_local_cache
=
mmap
(
NULL
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
),
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
s
,
0
);
if
(
T_local_cache
==
NULL
)
if
(
T_local_cache
==
MAP_FAILED
)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
close
(
s
);
...
...
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