[gst-cvs] gstreamer: gstvalue: Don't initialize arrays from variables
Sebastian Dröge
slomo at kemper.freedesktop.org
Sun Jun 13 23:18:36 PDT 2010
Module: gstreamer
Branch: master
Commit: 603c04f4fa9b1e0ba0c7e6d7dec6d3bd2d96f7f9
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=603c04f4fa9b1e0ba0c7e6d7dec6d3bd2d96f7f9
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Mon Jun 14 08:18:00 2010 +0200
gstvalue: Don't initialize arrays from variables
---
gst/gstvalue.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gst/gstvalue.c b/gst/gstvalue.c
index c97194d..3461943 100644
--- a/gst/gstvalue.c
+++ b/gst/gstvalue.c
@@ -686,13 +686,13 @@ gst_value_transform_fourcc_string (const GValue * src_value,
GValue * dest_value)
{
guint32 fourcc = src_value->data[0].v_int;
+ gchar fourcc_char[4];
+
+ fourcc_char[0] = (fourcc >> 0) & 0xff;
+ fourcc_char[1] = (fourcc >> 8) & 0xff;
+ fourcc_char[2] = (fourcc >> 16) & 0xff;
+ fourcc_char[3] = (fourcc >> 24) & 0xff;
- gchar fourcc_char[4] = {
- (fourcc >> 0) & 0xff,
- (fourcc >> 8) & 0xff,
- (fourcc >> 16) & 0xff,
- (fourcc >> 24) & 0xff
- };
if ((g_ascii_isalnum (fourcc_char[0]) || fourcc_char[0] == ' ') &&
(g_ascii_isalnum (fourcc_char[1]) || fourcc_char[1] == ' ') &&
(g_ascii_isalnum (fourcc_char[2]) || fourcc_char[2] == ' ') &&
@@ -716,13 +716,13 @@ static gchar *
gst_value_serialize_fourcc (const GValue * value)
{
guint32 fourcc = value->data[0].v_int;
+ gchar fourcc_char[4];
+
+ fourcc_char[0] = (fourcc >> 0) & 0xff;
+ fourcc_char[1] = (fourcc >> 8) & 0xff;
+ fourcc_char[2] = (fourcc >> 16) & 0xff;
+ fourcc_char[3] = (fourcc >> 24) & 0xff;
- gchar fourcc_char[4] = {
- (fourcc >> 0) & 0xff,
- (fourcc >> 8) & 0xff,
- (fourcc >> 16) & 0xff,
- (fourcc >> 24) & 0xff
- };
if ((g_ascii_isalnum (fourcc_char[0]) || fourcc_char[0] == ' ') &&
(g_ascii_isalnum (fourcc_char[1]) || fourcc_char[1] == ' ') &&
(g_ascii_isalnum (fourcc_char[2]) || fourcc_char[2] == ' ') &&
More information about the Gstreamer-commits
mailing list