Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
ec47b11f
Commit
ec47b11f
authored
Apr 17, 2014
by
Thomas Jahns
🤸
Browse files
Remove type-punning and rename for clarity.
parent
18f3e536
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/institution.c
View file @
ec47b11f
...
...
@@ -35,7 +35,7 @@ institute_t;
static
int
instituteCompareKernel
(
institute_t
*
ip1
,
institute_t
*
ip2
);
static
void
instituteDestroyP
(
institute_t
*
instituteptr
);
static
void
institutePrintP
(
institute_t
*
instituteptr
,
FILE
*
fp
);
static
int
instituteGet
SizeP
(
void
*
instituteptr
,
void
*
context
);
static
int
instituteGet
PackSize
(
institute_t
*
instituteptr
,
void
*
context
);
static
void
institutePackP
(
void
*
instituteptr
,
void
*
buf
,
int
size
,
int
*
position
,
void
*
context
);
static
int
instituteTxCode
(
void
);
...
...
@@ -43,7 +43,7 @@ static const resOps instituteOps = {
(
int
(
*
)(
void
*
,
void
*
))
instituteCompareKernel
,
(
void
(
*
)(
void
*
))
instituteDestroyP
,
(
void
(
*
)(
void
*
,
FILE
*
))
institutePrintP
,
instituteGetSize
P
,
(
int
(
*
)(
void
*
,
void
*
))
instituteGet
Pack
Size
,
institutePackP
,
instituteTxCode
};
...
...
@@ -302,12 +302,11 @@ enum {
institute_nints
=
5
,
};
static
int
instituteGet
SizeP
(
void
*
institute
ptr
,
void
*
context
)
static
int
instituteGet
PackSize
(
institute
_t
*
ip
,
void
*
context
)
{
institute_t
*
p
=
(
institute_t
*
)
instituteptr
;
int
txsize
=
serializeGetSize
(
institute_nints
,
DATATYPE_INT
,
context
)
+
serializeGetSize
(
strlen
(
p
->
name
)
+
1
,
DATATYPE_TXT
,
context
)
+
serializeGetSize
(
strlen
(
p
->
longname
)
+
1
,
DATATYPE_TXT
,
context
);
+
serializeGetSize
(
strlen
(
i
p
->
name
)
+
1
,
DATATYPE_TXT
,
context
)
+
serializeGetSize
(
strlen
(
i
p
->
longname
)
+
1
,
DATATYPE_TXT
,
context
);
return
txsize
;
}
...
...
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