Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
2b94ed41
Commit
2b94ed41
authored
Aug 05, 2014
by
Thomas Jahns
🤸
Browse files
Fix implicit conversions in namespaceNew.
parent
ed7f01f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/namespace.c
View file @
2b94ed41
...
...
@@ -202,7 +202,8 @@ namespaceNew()
else
if
(
namespacesSize
==
1
)
{
/* make room for additional namespace */
struct
Namespace
*
newNameSpaces
=
(
struct
Namespace
*
)
xmalloc
((
namespacesSize
+
1
)
*
sizeof
(
namespaces
[
0
]));
struct
Namespace
*
newNameSpaces
=
(
struct
Namespace
*
)
xmalloc
(((
size_t
)
namespacesSize
+
1
)
*
sizeof
(
namespaces
[
0
]));
memcpy
(
newNameSpaces
,
namespaces
,
sizeof
(
namespaces
[
0
]));
namespaces
=
newNameSpaces
;
++
namespacesSize
;
...
...
@@ -212,7 +213,8 @@ namespaceNew()
{
/* make room for additional namespace */
newNamespaceID
=
namespacesSize
;
namespaces
=
(
struct
Namespace
*
)
xrealloc
(
namespaces
,
(
namespacesSize
+
1
)
*
sizeof
(
namespaces
[
0
]));
namespaces
=
(
struct
Namespace
*
)
xrealloc
(
namespaces
,
((
size_t
)
namespacesSize
+
1
)
*
sizeof
(
namespaces
[
0
]));
++
namespacesSize
;
}
else
/* implicit: namespacesSize >= NUM_NAMESPACES */
...
...
Write
Preview
Supports
Markdown
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