[Xfce4-commits] <xfce4-weather-plugin:master> Remove superfluous newlines from data dumps.

Harald Judt noreply at xfce.org
Sun Aug 19 10:08:08 CEST 2012


Updating branch refs/heads/master
         to a11d33c4c9d6c4896cdd8adb39855233b4c1f5b2 (commit)
       from 00ac7601625dfc77ccdd6ffb1fab730419c3cd83 (commit)

commit a11d33c4c9d6c4896cdd8adb39855233b4c1f5b2
Author: Harald Judt <h.judt at gmx.at>
Date:   Sun Aug 19 00:31:51 2012 +0200

    Remove superfluous newlines from data dumps.

 panel-plugin/weather-debug.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/weather-debug.c b/panel-plugin/weather-debug.c
index 2d40d2a..c060947 100644
--- a/panel-plugin/weather-debug.c
+++ b/panel-plugin/weather-debug.c
@@ -141,7 +141,7 @@ weather_dump_geolocation(const xml_geolocation *geo)
                           "  region name: %s\n"
                           "  latitude: %s\n"
                           "  longitude: %s\n"
-                          "  --------------------------------------------\n",
+                          "  --------------------------------------------",
                           CHK_NULL(geo->city),
                           CHK_NULL(geo->country_name),
                           CHK_NULL(geo->country_code),
@@ -165,7 +165,7 @@ weather_dump_place(const xml_place *place)
                           "  display_name: %s\n"
                           "  latitude: %s\n"
                           "  longitude: %s\n"
-                          "  --------------------------------------------\n",
+                          "  --------------------------------------------",
                           CHK_NULL(place->display_name),
                           CHK_NULL(place->lat),
                           CHK_NULL(place->lon));
@@ -198,7 +198,7 @@ weather_dump_astrodata(const xml_astro *astro)
                           "  moon never rises: %s\n"
                           "  moon never sets: %s\n"
                           "  moon phase: %s\n"
-                          "  --------------------------------------------\n",
+                          "  --------------------------------------------",
                           sunrise,
                           sunset,
                           YESNO(astro->sun_never_rises),
@@ -341,7 +341,7 @@ weather_dump_plugindata(const xfceweather_data *data)
                            "  --------------------------------------------\n"
                            "  animation transitions: %s\n"
                            "  forecast days: %d\n"
-                           "  --------------------------------------------\n",
+                           "  --------------------------------------------",
                            data->panel_size,
                            data->size,
                            data->panel_orientation,
@@ -365,10 +365,6 @@ weather_dump_plugindata(const xfceweather_data *data)
     g_free(last_data_update);
     g_free(last_conditions_update);
 
-    /* Remove trailing newline */
-    if (out->str[out->len - 1] == '\n')
-        out->str[--out->len] = '\0';
-
     /* Free GString only and return its character data */
     result = out->str;
     g_string_free(out, FALSE);


More information about the Xfce4-commits mailing list