Followed Marcus' suggestion and use strlcpy() instead of strncpy() for Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24637 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
083b91d4ba
commit
4aef1c02ea
|
@ -769,7 +769,11 @@ MultiAudioNode::PrepareToConnect(const media_source& what,
|
|||
channel->fOutput.format = *format;
|
||||
|
||||
*source = channel->fOutput.source;
|
||||
#ifdef __HAIKU__
|
||||
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||
#else
|
||||
strncpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||
#endif
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
@ -801,7 +805,11 @@ MultiAudioNode::Connect(status_t error, const media_source& source,
|
|||
// format that we agreed on, and report our connection name again.
|
||||
channel->fOutput.destination = destination;
|
||||
channel->fOutput.format = format;
|
||||
#ifdef __HAIKU__
|
||||
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||
#else
|
||||
strncpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||
#endif
|
||||
|
||||
// reset our buffer duration, etc. to avoid later calculations
|
||||
bigtime_t duration = channel->fOutput.format.u.raw_audio.buffer_size * 10000
|
||||
|
|
Loading…
Reference in New Issue