Skip to contentSkip to conversation

memmove quick question ....

DISCUSSION Himanshu Raj 3 participants 3 messages Jan 9, 2006 – Jan 10, 2006

lore
Share & tools
lore
#0 lore raw

Hi Guys,

Quick question.
Does memmove ensure that there will be a NULL put after the last element in dest? Correctness of pirq_guest_unbind, e.g., depends on it.

Thanks,
Himanshu

Signature · 5 lines
-------------------------------------------------------------------------
Himanshu Raj
PhD Student, GaTech (www.cc.gatech.edu/~rhim)
I prefer to receive attachments in an open, non-proprietary format.
-------------------------------------------------------------------------
#1 lore raw
Quoted 2 lines · Himanshu Raj

Does memmove ensure that there will be a NULL put after the last element in dest?

no, it copy only N bytes from SRC to DEST.

(if the Nth bytes of SRC is NULL then DEST will be NULL terminated as well)

Signature · 1 line
Vincent Hanquez
#2 lore raw
In reply to Himanshu Raj
Quoted 3 lines · Himanshu Raj

Quick question.
Does memmove ensure that there will be a NULL put after the last element in dest? Correctness of pirq_guest_unbind, e.g., depends on it.

No, memmove does not do that. I think pirq_guest_bind/unbind are correct -- can you point out how you think they are broken?

Thanks,
Keir