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.
2004-02-02 Thomas Vander Stichele <thomas at apestaart dot org>
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 {
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,
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;
}
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 */
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;
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;
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();
check_old_typefind();
check_old_plugin();
check_caps();
+ check_lib_deprecated();
+ check_typo();
# less important stuff
}
}
+#
+# 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";
+ }
+}
+
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();
check_old_typefind();
check_old_plugin();
check_caps();
+ check_lib_deprecated();
+ check_typo();
# less important stuff
}
}
+#
+# 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";
+ }
+}
+