Commit e4be2582 authored by David Schleef's avatar David Schleef

code cleanup. Change bzero() to memset(). Remove duplicate ; at ends of lines.

Original commit message from CVS:
code cleanup.  Change bzero() to memset().  Remove duplicate ; at ends
of lines.
* ext/cdparanoia/gstcdparanoia.c: (cdparanoia_event):
* ext/flac/gstflactag.c: (gst_flac_tag_chain):
* ext/xvid/gstxviddec.c: (gst_xviddec_src_link):
* gst-libs/gst/play/play.c: (gst_play_get_sink_element):
* gst/ac3parse/gstac3parse.c: (gst_ac3parse_chain):
* gst/effectv/gstedge.c: (gst_edgetv_sinkconnect):
* gst/effectv/gstvertigo.c: (gst_vertigotv_sinkconnect):
* gst/intfloat/float22int.c: (gst_float2_2_int_getcaps),
(gst_float2_2_int_link):
* gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_chain_subtitle):
* gst/rtjpeg/RTjpeg.c: (RTjpeg_init_mcompress):
* gst/tcp/gsttcpsink.c: (gst_tcpsink_init_send):
* gst/tcp/gsttcpsrc.c: (gst_tcpsrc_init_receive):
* gst/udp/gstudpsink.c: (gst_udpsink_init_send):
* gst/udp/gstudpsrc.c: (gst_udpsrc_init_receive):
* sys/v4l/gstv4lelement.c: (gst_v4lelement_init):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture):
* testsuite/gst-lint: Add tests for bzero and ;;
parent 55a16802
2004-02-02 David Schleef <ds@schleef.org>
code cleanup. Change bzero() to memset(). Remove duplicate ; at ends
of lines.
* ext/cdparanoia/gstcdparanoia.c: (cdparanoia_event):
* ext/flac/gstflactag.c: (gst_flac_tag_chain):
* ext/xvid/gstxviddec.c: (gst_xviddec_src_link):
* gst-libs/gst/play/play.c: (gst_play_get_sink_element):
* gst/ac3parse/gstac3parse.c: (gst_ac3parse_chain):
* gst/effectv/gstedge.c: (gst_edgetv_sinkconnect):
* gst/effectv/gstvertigo.c: (gst_vertigotv_sinkconnect):
* gst/intfloat/float22int.c: (gst_float2_2_int_getcaps),
(gst_float2_2_int_link):
* gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_chain_subtitle):
* gst/rtjpeg/RTjpeg.c: (RTjpeg_init_mcompress):
* gst/tcp/gsttcpsink.c: (gst_tcpsink_init_send):
* gst/tcp/gsttcpsrc.c: (gst_tcpsrc_init_receive):
* gst/udp/gstudpsink.c: (gst_udpsink_init_send):
* gst/udp/gstudpsrc.c: (gst_udpsrc_init_receive):
* sys/v4l/gstv4lelement.c: (gst_v4lelement_init):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture):
* testsuite/gst-lint: Add tests for bzero and ;;
2004-02-02 David Schleef <ds@schleef.org>
* gst/debug/efence.c: Add fallback if MAP_ANONYMOUS isn't defined.
......
......@@ -863,7 +863,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
if (paranoia_seek (src->p, seg_start_sector, SEEK_SET) > -1) {
GST_DEBUG ("seeked to %" G_GINT64_FORMAT, seg_start_sector);
src->segment_start_sector = seg_start_sector;;
src->segment_start_sector = seg_start_sector;
src->cur_sector = src->segment_start_sector;
}
else {
......@@ -873,7 +873,7 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
if (seg_end_sector != -1) {
seg_end_sector = CLAMP (seg_end_sector,
src->first_sector, src->last_sector);
src->segment_end_sector = seg_end_sector;;
src->segment_end_sector = seg_end_sector;
}
GST_DEBUG ("configured for %d -> %d sectors\n",
src->segment_start_sector,
......
......@@ -1106,15 +1106,15 @@ gst_play_get_sink_element (GstPlay *play,
case GST_PLAY_SINK_TYPE_AUDIO:
if (has_audio_cap)
has_correct_type = TRUE;
break;;
break;
case GST_PLAY_SINK_TYPE_VIDEO:
if (has_video_cap)
has_correct_type = TRUE;
break;;
break;
case GST_PLAY_SINK_TYPE_ANY:
if ((has_video_cap) || (has_audio_cap))
has_correct_type = TRUE;
break;;
break;
default:
has_correct_type = FALSE;
}
......
......@@ -342,7 +342,7 @@ gst_tcpsink_init_send (GstTCPSink *sink)
struct hostent *he;
struct in_addr addr;
bzero (&sink->theiraddr, sizeof (sink->theiraddr));
memset (&sink->theiraddr, 0, sizeof (sink->theiraddr));
sink->theiraddr.sin_family = AF_INET; /* host byte order */
sink->theiraddr.sin_port = htons (sink->port); /* short, network byte order */
......
......@@ -376,7 +376,7 @@ static gboolean
gst_tcpsrc_init_receive (GstTCPSrc *src)
{
guint val=0;
bzero (&src->myaddr, sizeof (src->myaddr));
memset (&src->myaddr, 0, sizeof (src->myaddr));
src->myaddr.sin_family = AF_INET; /* host byte order */
src->myaddr.sin_port = htons (src->port); /* short, network byte order */
src->myaddr.sin_addr.s_addr = INADDR_ANY;
......
......@@ -413,7 +413,7 @@ gst_v4lelement_init (GstV4lElement *v4lelement)
v4lelement->video_fd = -1;
v4lelement->buffer = NULL;
v4lelement->videodev = g_strdup ("/dev/video");
v4lelement->display = g_strdup(g_getenv("DISPLAY"));;
v4lelement->display = g_strdup(g_getenv("DISPLAY"));
v4lelement->norms = NULL;
v4lelement->channels = NULL;
......
......@@ -42,6 +42,8 @@ sub check_old_plugin();
sub check_signal_new();
sub check_gnuc_const();
sub check_caps();
sub check_lib_deprecated();
sub check_typo();
sub m_check_plugindir();
sub m_check_interfaces();
......@@ -65,6 +67,8 @@ foreach $filename (<FIND>) {
check_old_typefind();
check_old_plugin();
check_caps();
check_lib_deprecated();
check_typo();
# less important stuff
......@@ -458,3 +462,23 @@ sub check_caps()
}
}
#
# Check for use of deprecated functions
#
sub check_lib_deprecated()
{
if (grep { /bzero/ } @lines) {
print "E: change bzero() to memset()\n";
}
}
#
# Check for typos
#
sub check_typo()
{
if (grep { /;\s*;\s*$/ } @lines) {
print "W: typo? \";;\"\n";
}
}
......@@ -42,6 +42,8 @@ sub check_old_plugin();
sub check_signal_new();
sub check_gnuc_const();
sub check_caps();
sub check_lib_deprecated();
sub check_typo();
sub m_check_plugindir();
sub m_check_interfaces();
......@@ -65,6 +67,8 @@ foreach $filename (<FIND>) {
check_old_typefind();
check_old_plugin();
check_caps();
check_lib_deprecated();
check_typo();
# less important stuff
......@@ -458,3 +462,23 @@ sub check_caps()
}
}
#
# Check for use of deprecated functions
#
sub check_lib_deprecated()
{
if (grep { /bzero/ } @lines) {
print "E: change bzero() to memset()\n";
}
}
#
# Check for typos
#
sub check_typo()
{
if (grep { /;\s*;\s*$/ } @lines) {
print "W: typo? \";;\"\n";
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment