Remove unsave usage of strncpy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42455 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -55,7 +55,7 @@ GameProducer::GameProducer(GameSoundBuffer* object,
|
|||||||
fPreferredFormat.u.raw_audio.channel_count = format->channel_count;
|
fPreferredFormat.u.raw_audio.channel_count = format->channel_count;
|
||||||
fPreferredFormat.u.raw_audio.frame_rate = format->frame_rate; // measured in Hertz
|
fPreferredFormat.u.raw_audio.frame_rate = format->frame_rate; // measured in Hertz
|
||||||
fPreferredFormat.u.raw_audio.byte_order = format->byte_order;
|
fPreferredFormat.u.raw_audio.byte_order = format->byte_order;
|
||||||
// fPreferredFormat.u.raw_audio.channel_mask = B_CHANNEL_LEFT & B_CHANNEL_RIGHT;
|
// fPreferredFormat.u.raw_audio.channel_mask = B_CHANNEL_LEFT | B_CHANNEL_RIGHT;
|
||||||
// fPreferredFormat.u.raw_audio.valid_bits = 32;
|
// fPreferredFormat.u.raw_audio.valid_bits = 32;
|
||||||
// fPreferredFormat.u.raw_audio.matrix_mask = B_MATRIX_AMBISONIC_WXYZ;
|
// fPreferredFormat.u.raw_audio.matrix_mask = B_MATRIX_AMBISONIC_WXYZ;
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ GameProducer::PrepareToConnect(const media_source& what, const media_destination
|
|||||||
fOutput.destination = where;
|
fOutput.destination = where;
|
||||||
fOutput.format = *format;
|
fOutput.format = *format;
|
||||||
*out_source = fOutput.source;
|
*out_source = fOutput.source;
|
||||||
strncpy(out_name, fOutput.name, B_MEDIA_NAME_LENGTH);
|
strlcpy(out_name, fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ GameProducer::Connect(status_t error, const media_source& source, const media_de
|
|||||||
// that we agreed on, and report our connection name again.
|
// that we agreed on, and report our connection name again.
|
||||||
fOutput.destination = destination;
|
fOutput.destination = destination;
|
||||||
fOutput.format = format;
|
fOutput.format = format;
|
||||||
strncpy(io_name, fOutput.name, B_MEDIA_NAME_LENGTH);
|
strlcpy(io_name, fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||||
|
|
||||||
// Now that we're connected, we can determine our downstream latency.
|
// Now that we're connected, we can determine our downstream latency.
|
||||||
// Do so, then make sure we get our events early enough.
|
// Do so, then make sure we get our events early enough.
|
||||||
@@ -393,7 +393,7 @@ GameProducer::NodeRegistered()
|
|||||||
fOutput.source.port = ControlPort();
|
fOutput.source.port = ControlPort();
|
||||||
fOutput.source.id = 0;
|
fOutput.source.id = 0;
|
||||||
fOutput.node = Node();
|
fOutput.node = Node();
|
||||||
::strcpy(fOutput.name, "GameProducer Output");
|
strlcpy(fOutput.name, "GameProducer Output", B_MEDIA_NAME_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -844,9 +844,9 @@ BWindowScreen::_GetCardInfo()
|
|||||||
fCardInfo.height = mode.virtual_height;
|
fCardInfo.height = mode.virtual_height;
|
||||||
|
|
||||||
if (mode.space & 0x10)
|
if (mode.space & 0x10)
|
||||||
strncpy(fCardInfo.rgba_order, "rgba", 4);
|
memcpy(fCardInfo.rgba_order, "rgba", 4);
|
||||||
else
|
else
|
||||||
strncpy(fCardInfo.rgba_order, "bgra", 4);
|
memcpy(fCardInfo.rgba_order, "bgra", 4);
|
||||||
|
|
||||||
fCardInfo.flags = 0;
|
fCardInfo.flags = 0;
|
||||||
if (mode.flags & B_SCROLL)
|
if (mode.flags & B_SCROLL)
|
||||||
|
|||||||
Reference in New Issue
Block a user