Closed mfrey closed 5 years ago
Ok, so we do not change this?
On Thu 31. Jan 2019 at 16:57, Michael Frey notifications@github.com wrote:
@mfrey commented on this pull request.
In src/ccnl-utils/src/ccn-lite-rpc.c https://github.com/cn-uofbasel/ccn-lite/pull/343#discussion_r252726044:
@@ -370,7 +370,7 @@ main(int argc, char *argv[]) return -1; } nonce->type = LRPC_NONCE;
- nonce->aux = malloc(sizeof(int));
- nonce->aux = malloc(sizeof(struct rdr_ds_s)); memcpy(nonce->aux, &n, sizeof(int));
this inits the first int in the struct? right?
I would have said that this initialises a nested element of type struct rdr_ds_s (a bit like a next pointer to the next element in a list).
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/cn-uofbasel/ccn-lite/pull/343#discussion_r252726044, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeQ_bjRO3Gt3X4_m1LGTBBNDXTGPMRtks5vIxJIgaJpZM4acg7i .
-- Christopher Scherb, MSc University of Basel Computer Network Group Room 04.004 Spiegelgasse 1 CH-4051 Basel, Switzerland E-Mail: christopher.scherb@unibas.ch
Contribution description
The PR fixes the size of two calls to sizeof. During the last cleanup (see also #337) the size of some length parameter changed from
int
tosize_t
. Hence, a call to sizeof needed to be changed fromint
tosize_t
intest_prefix.c
. The other parameter was changed from anint
tostruct rdr_ds_s
inccn-lite-rpc.c
Issues/PRs references
Fixes #324