rtsp: clarify expression so operator precedence is clear
authorSanjay NM <sanjay.nm@samsung.com>
Thu, 18 Sep 2014 12:29:31 +0000 (17:59 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 23 Sep 2014 23:48:09 +0000 (00:48 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=736903

gst/rtsp/gstrtspsrc.c

index d3dea95..6e05cc5 100644 (file)
@@ -6251,7 +6251,8 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src, gboolean async)
               stream->id));
 
     /* handle the code ourselves */
-    if ((res = gst_rtspsrc_send (src, conn, &request, &response, &code) < 0))
+    res = gst_rtspsrc_send (src, conn, &request, &response, &code);
+    if (res < 0)
       goto send_error;
 
     switch (code) {
@@ -7935,11 +7936,13 @@ gst_rtspsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri,
     goto was_ok;
 
   if (g_str_has_prefix (uri, "rtsp-sdp://")) {
-    if ((res = gst_sdp_message_new (&sdp) < 0))
+    res = gst_sdp_message_new (&sdp);
+    if (res < 0)
       goto sdp_failed;
 
     GST_DEBUG_OBJECT (src, "parsing SDP message");
-    if ((res = gst_sdp_message_parse_uri (uri, sdp) < 0))
+    res = gst_sdp_message_parse_uri (uri, sdp);
+    if (res < 0)
       goto invalid_sdp;
   } else {
     /* try to parse */