From cfaca3319da4920d74ff55c1f4aad00e80bcac95 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 22 Mar 2025 00:05:16 +0200
Subject: [PATCH 15/15] common/: Remove trailing spaces

See RM #1260

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 common/city.c          | 40 ++++++++++++++++++++--------------------
 common/city.h          |  4 ++--
 common/combat.c        |  8 ++++----
 common/culture.h       |  4 ++--
 common/diptreaty.c     |  8 ++++----
 common/events.c        |  4 ++--
 common/extras.c        |  2 +-
 common/featured_text.c |  1 -
 common/featured_text.h |  6 +++---
 common/game.h          |  4 ++--
 common/government.c    |  4 ++--
 common/improvement.c   |  4 ++--
 common/mapimg.c        |  3 ++-
 common/nation.c        |  8 ++++----
 common/oblig_reqs.c    |  2 +-
 common/reqtext.c       |  4 ++--
 common/spaceship.c     |  6 +++---
 common/spaceship.h     |  2 +-
 common/tech.h          | 10 +++++-----
 common/tile.c          |  4 ++--
 common/unit.c          |  8 ++++----
 common/unit.h          |  2 +-
 common/unittype.c      |  2 +-
 common/victory.h       |  4 ++--
 common/workertask.h    |  4 ++--
 common/worklist.c      | 16 ++++++++--------
 26 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/common/city.c b/common/city.c
index 3c94443357..47bb07f53e 100644
--- a/common/city.c
+++ b/common/city.c
@@ -687,7 +687,7 @@ const char *city_improvement_name_translation(const struct city *pcity,
 
   if (state) {
     fc_snprintf(buffer, sizeof(buffer), "%s(%s)",
-                improvement_name_translation(pimprove), state); 
+                improvement_name_translation(pimprove), state);
     return buffer;
   } else {
     return improvement_name_translation(pimprove);
@@ -853,7 +853,7 @@ bool can_city_build_improvement_direct(const struct city *pcity,
 **************************************************************************/
 bool can_city_build_improvement_now(const struct city *pcity,
                                     const struct impr_type *pimprove)
-{  
+{
   if (!can_city_build_improvement_direct(pcity, pimprove)) {
     return FALSE;
   }
@@ -897,7 +897,7 @@ bool can_city_build_improvement_later(const struct city *pcity,
 }
 
 /**********************************************************************//**
-  Return whether given city can build given unit, ignoring whether unit 
+  Return whether given city can build given unit, ignoring whether unit
   is obsolete.
 **************************************************************************/
 bool can_city_build_unit_direct(const struct civ_map *nmap,
@@ -941,7 +941,7 @@ bool can_city_build_unit_direct(const struct civ_map *nmap,
 }
 
 /**********************************************************************//**
-  Return whether given city can build given unit; returns FALSE if unit is 
+  Return whether given city can build given unit; returns FALSE if unit is
   obsolete.
 **************************************************************************/
 bool can_city_build_unit_now(const struct civ_map *nmap,
@@ -1026,7 +1026,7 @@ bool can_city_build_now(const struct civ_map *nmap,
 }
 
 /**********************************************************************//**
-  Returns whether city can ever build given target, unit or improvement. 
+  Returns whether city can ever build given target, unit or improvement.
 **************************************************************************/
 bool can_city_build_later(const struct civ_map *nmap,
                           const struct city *pcity,
@@ -1087,7 +1087,7 @@ bool city_can_change_build(const struct city *pcity)
 void city_choose_build_default(const struct civ_map *nmap, struct city *pcity)
 {
   if (NULL == city_tile(pcity)) {
-    /* When a "dummy" city is created with no tile, then choosing a build 
+    /* When a "dummy" city is created with no tile, then choosing a build
      * target could fail. This currently might happen during map editing.
      * FIXME: assumes the first unit is always "valid", so check for
      * obsolete units elsewhere. */
@@ -1241,7 +1241,7 @@ bool city_has_building(const struct city *pcity,
                        const struct impr_type *pimprove)
 {
   if (NULL == pimprove) {
-    /* Callers should ensure that any external data is tested with 
+    /* Callers should ensure that any external data is tested with
      * valid_improvement_by_number() */
     return FALSE;
   }
@@ -1346,9 +1346,9 @@ int city_tile_output(const struct city *pcity, const struct tile *ptile,
       }
     }
 
-    prod += (prod 
+    prod += (prod
              * get_tile_output_bonus(pcity, ptile, output,
-                                     EFT_OUTPUT_PER_TILE)) 
+                                     EFT_OUTPUT_PER_TILE))
             / 100;
     if (penalty_limit > 0 && prod > penalty_limit) {
       if (prod <= game.info.granularity) {
@@ -1750,7 +1750,7 @@ int city_style_by_rule_name(const char *s)
 }
 
 /**********************************************************************//**
-  Return the (translated) name of the given city style. 
+  Return the (translated) name of the given city style.
   You don't have to free the return pointer.
 **************************************************************************/
 const char *city_style_name_translation(const int style)
@@ -2106,7 +2106,7 @@ bool is_friendly_city_near(const struct civ_map *nmap,
 }
 
 /**********************************************************************//**
-  Return TRUE iff a city exists within a city radius of the given 
+  Return TRUE iff a city exists within a city radius of the given
   location. may_be_on_center determines if a city at x,y counts.
 **************************************************************************/
 bool city_exists_within_max_city_map(const struct civ_map *nmap,
@@ -2527,7 +2527,7 @@ static void citizen_base_mood(struct city *pcity)
   *angry = MIN(base_angry, size - spes);
 
   /* Create unhappy citizens. In the beginning, all who are not content,
-   * specialists or angry are unhappy. This is changed by luxuries and 
+   * specialists or angry are unhappy. This is changed by luxuries and
    * buildings later. */
   *unhappy = (size - spes - *content - *angry);
 
@@ -2536,7 +2536,7 @@ static void citizen_base_mood(struct city *pcity)
 }
 
 /**********************************************************************//**
-  Make people happy: 
+  Make people happy:
    * angry citizen are eliminated first
    * then content are made happy, then unhappy content, etc.
    * each conversions costs 2 or 4 luxuries.
@@ -2824,7 +2824,7 @@ int city_pollution(const struct city *pcity, int shield_total)
 }
 
 /**********************************************************************//**
-  Gets whether cities that pcity trades with had the plague. If so, it 
+  Gets whether cities that pcity trades with had the plague. If so, it
   returns the health penalty in tenth of percent which depends on the size
   of both cities. The health penalty is given as the product of the ruleset
   option 'game.info.illness_trade_infection' (in percent) and the square
@@ -2957,12 +2957,12 @@ inline void set_city_production(struct city *pcity)
   /* Calculate city production!
    *
    * This is a rather complicated process if we allow rules to become
-   * more generalized.  We can assume that there are no recursive dependency
+   * more generalized. We can assume that there are no recursive dependency
    * loops, but there are some dependencies that do not follow strict
-   * ordering.  For instance corruption must be calculated before 
+   * ordering. For instance corruption must be calculated before
    * trade taxes can be counted up, which must occur before the science bonus
-   * is added on.  But the calculation of corruption must include the
-   * trade bonus.  To do this without excessive special casing means that in
+   * is added on. But the calculation of corruption must include the
+   * trade bonus. To do this without excessive special casing means that in
    * this case the bonuses are multiplied on twice (but only saved the second
    * time).
    */
@@ -2996,7 +2996,7 @@ inline void set_city_production(struct city *pcity)
       if (settings->cancelling == TRI_ACTIVE) {
         can_trade = TRUE;
       }
-    } 
+    }
 
     if (can_trade) {
       int value;
@@ -3398,7 +3398,7 @@ void city_remove_improvement(struct city *pcity,
 {
   log_debug("Improvement %s removed from city %s",
             improvement_rule_name(pimprove), pcity->name);
-  
+
   pcity->built[improvement_index(pimprove)].turn = I_DESTROYED;
 
   if (is_server() && is_wonder(pimprove)) {
diff --git a/common/city.h b/common/city.h
index 2dedfce0c7..25006810fd 100644
--- a/common/city.h
+++ b/common/city.h
@@ -378,8 +378,8 @@ struct city {
   bool was_happy;
   bool had_famine;
 
-  int anarchy;                  /* anarchy rounds count */ 
-  int rapture;                  /* rapture rounds count */ 
+  int anarchy;                  /* anarchy rounds count */
+  int rapture;                  /* rapture rounds count */
   int turn_founded;
   int turn_last_built;
 
diff --git a/common/combat.c b/common/combat.c
index 60d7776447..140d742134 100644
--- a/common/combat.c
+++ b/common/combat.c
@@ -341,7 +341,7 @@ double win_chance(int as, int ahp, int afp, int ds, int dhp, int dfp)
   double def_P_lose1 = 1 - att_P_lose1;
 
   /*
-    This calculates 
+    This calculates
 
     binomial_coeff(def_N_lose-1 + lr, lr)
       * def_P_lose1^(def_N_lose-1)
@@ -449,7 +449,7 @@ void get_modified_firepower(const struct civ_map *nmap,
     *def_fp = MIN(*def_fp, game.info.low_firepower_pearl_harbor);
   }
 
-  /* 
+  /*
    * When attacked by fighters, helicopters have their firepower
    * reduced to low firepower bonus.
    */
@@ -496,7 +496,7 @@ double unit_win_chance(const struct civ_map *nmap,
 }
 
 /*******************************************************************//**
-  Try defending against nuclear attack; if successful, return a city which 
+  Try defending against nuclear attack; if successful, return a city which
   had enough luck and EFT_NUKE_PROOF.
   If the attack was successful return NULL.
 ***********************************************************************/
@@ -766,7 +766,7 @@ int get_virtual_defense_power(const struct civ_map *nmap,
 
 /*******************************************************************//**
  return the modified defense power of a unit.
- An veteran aegis cruiser in a mountain city with SAM and SDI defense 
+ An veteran aegis cruiser in a mountain city with SAM and SDI defense
  being attacked by a missile gets defense 288.
 ***********************************************************************/
 int get_total_defense_power(const struct unit *attacker,
diff --git a/common/culture.h b/common/culture.h
index 95182b9987..4440abd11e 100644
--- a/common/culture.h
+++ b/common/culture.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,4 +30,4 @@ int nation_history_gain(const struct player *pplayer);
 }
 #endif /* __cplusplus */
 
-#endif  /* FC__CULTURE_H */
+#endif /* FC__CULTURE_H */
diff --git a/common/diptreaty.c b/common/diptreaty.c
index 0fca99e0cd..d9b0de1d32 100644
--- a/common/diptreaty.c
+++ b/common/diptreaty.c
@@ -70,7 +70,7 @@ bool could_meet_with_player(const struct player *pplayer,
           && diplomacy_possible(pplayer,aplayer)
           && get_player_bonus(pplayer, EFT_NO_DIPLOMACY) <= 0
           && get_player_bonus(aplayer, EFT_NO_DIPLOMACY) <= 0
-          && (player_has_embassy(aplayer, pplayer) 
+          && (player_has_embassy(aplayer, pplayer)
               || player_has_embassy(pplayer, aplayer)
               || player_diplstate_get(pplayer, aplayer)->contact_turns_left
                  > 0
@@ -161,7 +161,7 @@ bool add_clause(struct treaty *ptreaty, struct player *pfrom,
     log_error("Illegal tech value %i in clause.", val);
     return FALSE;
   }
-  
+
   if (is_pact_clause(type)
       && ((ds == DS_PEACE && type == CLAUSE_PEACE)
           || (ds == DS_ARMISTICE && type == CLAUSE_PEACE)
@@ -170,7 +170,7 @@ bool add_clause(struct treaty *ptreaty, struct player *pfrom,
     /* we already have this diplomatic state */
     log_error("Illegal treaty suggested between %s and %s - they "
               "already have this treaty level.",
-              nation_rule_name(nation_of_player(ptreaty->plr0)), 
+              nation_rule_name(nation_of_player(ptreaty->plr0)),
               nation_rule_name(nation_of_player(ptreaty->plr1)));
     return FALSE;
   }
@@ -247,7 +247,7 @@ bool add_clause(struct treaty *ptreaty, struct player *pfrom,
   pclause->type  = type;
   pclause->from  = pfrom;
   pclause->value = val;
-  
+
   clause_list_append(ptreaty->clauses, pclause);
 
   ptreaty->accept0 = FALSE;
diff --git a/common/events.c b/common/events.c
index 7f9e87a47c..7a06840f87 100644
--- a/common/events.c
+++ b/common/events.c
@@ -325,7 +325,7 @@ bool is_city_event(enum event_type event)
 }
 
 /**********************************************************************//**
-  Initialize events. 
+  Initialize events.
   Now also initialise sorted_events[].
 **************************************************************************/
 void events_init(void)
@@ -372,7 +372,7 @@ void events_init(void)
 }
 
 /**********************************************************************//**
-  Free events. 
+  Free events.
 **************************************************************************/
 void events_free(void)
 {
diff --git a/common/extras.c b/common/extras.c
index 7474f2fc17..b477b0dc19 100644
--- a/common/extras.c
+++ b/common/extras.c
@@ -571,7 +571,7 @@ static bool can_extra_be_removed(const struct extra_type *pextra,
     if (extra_has_flag(pextra, EF_AUTO_ON_CITY_CENTER)) {
       struct tile *vtile = tile_virtual_new(ptile);
 
-      /* Would extra get rebuilt if removed */ 
+      /* Would extra get rebuilt if removed */
       tile_remove_extra(vtile, pextra);
       if (player_can_build_extra(pextra, city_owner(pcity), vtile)) {
         /* No need to worry about conflicting extras - extra would had
diff --git a/common/featured_text.c b/common/featured_text.c
index 57f352d33c..e8cf326ee4 100644
--- a/common/featured_text.c
+++ b/common/featured_text.c
@@ -854,7 +854,6 @@ static size_t extract_sequence_text(const char *featured_text,
   }
   return stop - featured_text + 1;
 }
-                                    
 
 /**********************************************************************//**
   Separate the text from the text features. 'tags' can be nullptr.
diff --git a/common/featured_text.h b/common/featured_text.h
index 6e0f0e2431..90faf8a8a8 100644
--- a/common/featured_text.h
+++ b/common/featured_text.h
@@ -69,7 +69,7 @@ extern "C" {
  * Full name sequence: [strike] ... [/strike]
  * Abbreviation sequence: [s] ... [/s]
  * Text tag type: TTT_STRIKE
- * 
+ *
  * - Underline.
  * Full name sequence: [underline] ... [/underline]
  * Abbreviation sequence: [u] ... [/u]
@@ -104,12 +104,12 @@ typedef int ft_offset_t;
 #define FT_OFFSET_UNSET ((ft_offset_t) -1)
 
 /* Opaque type. */
-struct text_tag;               
+struct text_tag;
 
 /* Define struct text_tag_list. */
 #define SPECLIST_TAG text_tag
 #define SPECLIST_TYPE struct text_tag
-#include "speclist.h"           
+#include "speclist.h"
 
 #define text_tag_list_iterate(tags, ptag) \
   TYPED_LIST_ITERATE(struct text_tag, tags, ptag)
diff --git a/common/game.h b/common/game.h
index 75ac78e7c2..b9201fc6a0 100644
--- a/common/game.h
+++ b/common/game.h
@@ -75,8 +75,8 @@ struct user_flag
   char *helptxt;
 };
 
-/* The number of turns that the first user needs to be attached to a 
- * player for that user to be ranked as that player */
+/* The number of turns that the first user needs to be attached to
+ * a player for that user to be ranked as that player */
 #define TURNS_NEEDED_TO_RANK 10
 
 struct civ_game {
diff --git a/common/government.c b/common/government.c
index 39254770d8..5d37a3c367 100644
--- a/common/government.c
+++ b/common/government.c
@@ -137,7 +137,7 @@ const char *government_rule_name(const struct government *pgovern)
 }
 
 /**********************************************************************//**
-  Return the (translated) name of the given government. 
+  Return the (translated) name of the given government.
   You don't have to free the return pointer.
 **************************************************************************/
 const char *government_name_translation(const struct government *pgovern)
@@ -148,7 +148,7 @@ const char *government_name_translation(const struct government *pgovern)
 }
 
 /**********************************************************************//**
-  Return the (translated) name of the given government of a player. 
+  Return the (translated) name of the given government of a player.
   You don't have to free the return pointer.
 **************************************************************************/
 const char *government_name_for_player(const struct player *pplayer)
diff --git a/common/improvement.c b/common/improvement.c
index ed0a6fadd9..9b752fcc78 100644
--- a/common/improvement.c
+++ b/common/improvement.c
@@ -237,7 +237,7 @@ const struct impr_type *valid_improvement_by_number(const Impr_type_id id)
 }
 
 /**********************************************************************//**
-  Return the (translated) name of the given improvement. 
+  Return the (translated) name of the given improvement.
   You don't have to free the return pointer.
 **************************************************************************/
 const char *improvement_name_translation(const struct impr_type *pimprove)
@@ -1139,7 +1139,7 @@ enum test_result test_player_sell_building_now(struct player *pplayer,
   }
 
   /* Check if particular building can be solt */
-  if (pimprove != NULL 
+  if (pimprove != NULL
       && !can_city_sell_building(pcity, pimprove)) {
     return TR_OTHER_FAILURE;
   }
diff --git a/common/mapimg.c b/common/mapimg.c
index e0b69c6e9c..b1e3488548 100644
--- a/common/mapimg.c
+++ b/common/mapimg.c
@@ -740,7 +740,7 @@ char *mapimg_help(const char *cmdname)
     astr_str(&defaults[MAPDEF_TURNS]), astr_str(&defaults[MAPDEF_ZOOM]),
     astr_str(&defaults[MAPDEF_MAP]),
     astr_str(&str_format), astr_str(&str_showplr));
-  
+
   mapdef_destroy(pmapdef);
   astr_free(&str_format);
   astr_free(&str_showplr);
@@ -2986,6 +2986,7 @@ static void base_coor_hexa(struct img *pimg, int *base_x, int *base_y,
                            int x, int y)
 {
   int nat_x, nat_y;
+
   MAP_TO_NATIVE_POS(&nat_x, &nat_y, x, y);
 
   *base_x = nat_x * TILE_SIZE + ((nat_y % 2) ? TILE_SIZE / 2 : 0);
diff --git a/common/nation.c b/common/nation.c
index e3f16389c6..fe262b1373 100644
--- a/common/nation.c
+++ b/common/nation.c
@@ -143,7 +143,7 @@ const char *nation_rule_name(const struct nation_type *pnation)
 }
 
 /************************************************************************//**
-  Return the (translated) adjective for the given nation. 
+  Return the (translated) adjective for the given nation.
   You don't have to free the return pointer.
 ****************************************************************************/
 const char *nation_adjective_translation(const struct nation_type *pnation)
@@ -153,7 +153,7 @@ const char *nation_adjective_translation(const struct nation_type *pnation)
 }
 
 /************************************************************************//**
-  Return the (translated) plural noun of the given nation. 
+  Return the (translated) plural noun of the given nation.
   You don't have to free the return pointer.
 ****************************************************************************/
 const char *nation_plural_translation(const struct nation_type *pnation)
@@ -163,7 +163,7 @@ const char *nation_plural_translation(const struct nation_type *pnation)
 }
 
 /************************************************************************//**
-  Return the (translated) adjective for the given nation of a player. 
+  Return the (translated) adjective for the given nation of a player.
   You don't have to free the return pointer.
 ****************************************************************************/
 const char *nation_adjective_for_player(const struct player *pplayer)
@@ -172,7 +172,7 @@ const char *nation_adjective_for_player(const struct player *pplayer)
 }
 
 /************************************************************************//**
-  Return the (translated) plural noun of the given nation of a player. 
+  Return the (translated) plural noun of the given nation of a player.
   You don't have to free the return pointer.
 ****************************************************************************/
 const char *nation_plural_for_player(const struct player *pplayer)
diff --git a/common/oblig_reqs.c b/common/oblig_reqs.c
index 4a911104e7..eb5fb4ba2a 100644
--- a/common/oblig_reqs.c
+++ b/common/oblig_reqs.c
@@ -840,7 +840,7 @@ void oblig_hard_reqs_free(void)
       ae_contra_close(oreq->contras);
     } obligatory_req_vector_iterate_end;
     obligatory_req_vector_free(&oblig_hard_reqs_sr[i]);
-  }  
+  }
 }
 
 /**********************************************************************//**
diff --git a/common/reqtext.c b/common/reqtext.c
index 61ae6fa7f8..c458444c64 100644
--- a/common/reqtext.c
+++ b/common/reqtext.c
@@ -1252,7 +1252,7 @@ bool req_text_insert(char *buf, size_t bufsz, struct player *pplayer,
     fc_strlcat(buf, prefix, bufsz);
     if (preq->present) {
       cat_snprintf(buf, bufsz,
-                   /* TRANS: "Requires that you are playing Asian style 
+                   /* TRANS: "Requires that you are playing Asian style
                     * nation." */
                    _("Requires that you are playing %s style nation."),
                    style_name_translation(preq->source.value.style));
@@ -1779,7 +1779,7 @@ bool req_text_insert(char *buf, size_t bufsz, struct player *pplayer,
           /* TRANS: %s is a list of unit classes separated by "or". */
           cat_snprintf(buf, bufsz, Q_("?uclasslist:Requires %s units."),
                        astr_str(&list));
-        } else { 
+        } else {
           /* TRANS: %s is a list of unit classes separated by "or". */
           cat_snprintf(buf, bufsz, Q_("?uclasslist:Does not apply to "
                                       "%s units."),
diff --git a/common/spaceship.c b/common/spaceship.c
index 66a8df0da9..f3d33ebfb2 100644
--- a/common/spaceship.c
+++ b/common/spaceship.c
@@ -132,7 +132,7 @@ bool next_spaceship_component(struct player *pplayer,
                               struct spaceship_component *fill)
 {
   fc_assert_ret_val(fill != NULL, FALSE);
-  
+
   if (ship->modules > (ship->habitation + ship->life_support
 		       + ship->solar_panels)) {
     /* "nice" governments prefer to keep success 100%;
@@ -185,12 +185,12 @@ bool next_spaceship_component(struct player *pplayer,
     int i;
 
     if (!BV_ISSET(ship->structure, 0)) {
-      /* if we don't have the first structural, place that! */
+      /* If we don't have the first structural, place that! */
       fill->type = SSHIP_PLACE_STRUCTURAL;
       fill->num = 0;
       return TRUE;
     }
-    
+
     if (ship->habitation >= 1
         && !BV_ISSET(ship->structure, modules_info[0].required)) {
       req = modules_info[0].required;
diff --git a/common/spaceship.h b/common/spaceship.h
index e2a5b6ad0c..968e9b1331 100644
--- a/common/spaceship.h
+++ b/common/spaceship.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/common/tech.h b/common/tech.h
index b4dbbd8a0a..9f95746832 100644
--- a/common/tech.h
+++ b/common/tech.h
@@ -36,8 +36,8 @@ typedef int Tech_type_id;
   use Tech_type_id very widely, and don't use (-1) flag values. (?)
 */
 /* [more accurately]
- * Unlike most other indices, the Tech_type_id is widely used, because it 
- * so frequently passed to packet and scripting.  The client menu routines 
+ * Unlike most other indices, the Tech_type_id is widely used, because it
+ * so frequently passed to packet and scripting. The client menu routines
  * sometimes add and subtract these numbers.
  */
 #define A_NONE 0
@@ -136,8 +136,8 @@ struct advance {
   bv_tech_flags flags;
   struct strvec *helptext;
 
-  /* 
-   * Message displayed to the first player to get a bonus tech 
+  /*
+   * Message displayed to the first player to get a bonus tech
    */
   char *bonus_message;
 
@@ -146,7 +146,7 @@ struct advance {
    * be right if game.info.tech_cost_style is TECH_COST_CIV1CIV2. */
   double cost;
 
-  /* 
+  /*
    * Number of requirements this technology has _including_
    * itself. Precalculated at server then send to client.
    */
diff --git a/common/tile.c b/common/tile.c
index d6f53508fb..8d67f30623 100644
--- a/common/tile.c
+++ b/common/tile.c
@@ -172,7 +172,7 @@ const bv_extras *tile_extras_null(void)
     empty_cleared = TRUE;
   }
 
-  return &(empty_extras);  
+  return &(empty_extras);
 }
 
 /************************************************************************//**
@@ -688,7 +688,7 @@ bool tile_apply_activity(struct tile *ptile, Activity_type_id act,
     tile_mine(ptile, tgt);
     return TRUE;
 
-  case ACTIVITY_IRRIGATE: 
+  case ACTIVITY_IRRIGATE:
     tile_irrigate(ptile, tgt);
     return TRUE;
 
diff --git a/common/unit.c b/common/unit.c
index a8ded2251c..ff847fc1e7 100644
--- a/common/unit.c
+++ b/common/unit.c
@@ -867,8 +867,8 @@ bool can_unit_continue_current_activity(const struct civ_map *nmap,
 {
   enum unit_activity current = punit->activity;
   struct extra_type *target = punit->activity_target;
-  enum unit_activity current2 = 
-              (current == ACTIVITY_FORTIFIED) ? ACTIVITY_FORTIFYING : current;
+  enum unit_activity current2
+    = (current == ACTIVITY_FORTIFIED) ? ACTIVITY_FORTIFYING : current;
   enum gen_action action = punit->action;
   bool result;
 
@@ -1495,7 +1495,7 @@ bool is_plr_zoc_srv(const struct player *pplayer, const struct tile *ptile0,
   enemy unit (that has a ZOC) on a terrain that has zoc rules.
 
   Since this function is used in the client, it has to deal with some
-  client-specific features, like FoW and the fact that the client cannot 
+  client-specific features, like FoW and the fact that the client cannot
   see units inside enemy cities.
 **************************************************************************/
 bool is_plr_zoc_client(const struct player *pplayer, const struct tile *ptile0,
@@ -1833,7 +1833,7 @@ int get_transporter_occupancy(const struct unit *ptrans)
 }
 
 /**********************************************************************//**
-  Helper for transporter_for_unit() and transporter_for_unit_at() 
+  Helper for transporter_for_unit() and transporter_for_unit_at()
 **************************************************************************/
 static struct unit *base_transporter_for_unit(const struct unit *pcargo,
                                               const struct tile *ptile,
diff --git a/common/unit.h b/common/unit.h
index a5502309e9..1733b553ba 100644
--- a/common/unit.h
+++ b/common/unit.h
@@ -51,7 +51,7 @@ enum unit_orders {
 };
 
 enum unit_focus_status {
-  FOCUS_AVAIL, FOCUS_WAIT, FOCUS_DONE  
+  FOCUS_AVAIL, FOCUS_WAIT, FOCUS_DONE
 };
 
 enum goto_route_type {
diff --git a/common/unittype.c b/common/unittype.c
index dde32c1efa..7f4bad294a 100644
--- a/common/unittype.c
+++ b/common/unittype.c
@@ -182,7 +182,7 @@ int utype_upkeep_cost(const struct unit_type *ut, struct player *pplayer,
   Return the "happy cost" (the number of citizens who are discontented)
   for this unit.
 **************************************************************************/
-int utype_happy_cost(const struct unit_type *ut, 
+int utype_happy_cost(const struct unit_type *ut,
                      const struct player *pplayer)
 {
   return ut->happy_cost * get_player_bonus(pplayer, EFT_UNHAPPY_FACTOR);
diff --git a/common/victory.h b/common/victory.h
index 9e2252259e..41189420ec 100644
--- a/common/victory.h
+++ b/common/victory.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,4 +23,4 @@ bool victory_enabled(enum victory_condition_type victory);
 }
 #endif /* __cplusplus */
 
-#endif  /* FC__VICTORY_H */
+#endif /* FC__VICTORY_H */
diff --git a/common/workertask.h b/common/workertask.h
index 5f0a877070..ba81d4036a 100644
--- a/common/workertask.h
+++ b/common/workertask.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -42,4 +42,4 @@ bool worker_task_is_sane(struct worker_task *ptask);
 }
 #endif /* __cplusplus */
 
-#endif  /* FC__WORKERTASK_H */
+#endif /* FC__WORKERTASK_H */
diff --git a/common/worklist.c b/common/worklist.c
index 2b3e2c6480..6eb4220282 100644
--- a/common/worklist.c
+++ b/common/worklist.c
@@ -44,13 +44,13 @@ void worklist_init(struct worklist *pwl)
   for (i = 0; i < MAX_LEN_WORKLIST; i++) {
     /* just setting the entry to zero: */
     pwl->entries[i].kind = VUT_NONE;
-    /* all the union pointers should be in the same place: */ 
+    /* all the union pointers should be in the same place: */
     pwl->entries[i].value.building = NULL;
   }
 }
 
 /************************************************************************//**
-  Returns the number of entries in the worklist.  The returned value can
+  Returns the number of entries in the worklist. The returned value can
   also be used as the next available worklist index (assuming that
   len < MAX_LEN_WORKLIST).
 ****************************************************************************/
@@ -104,7 +104,7 @@ bool worklist_peek_ith(const struct worklist *pwl,
 void worklist_advance(struct worklist *pwl)
 {
   worklist_remove(pwl, 0);
-}  
+}
 
 /************************************************************************//**
   Copy contents from worklist src to worklist dst.
@@ -134,15 +134,15 @@ void worklist_remove(struct worklist *pwl, int idx)
   }
   /* just setting the entry to zero: */
   pwl->entries[pwl->length - 1].kind = VUT_NONE;
-  /* all the union pointers should be in the same place: */ 
+  /* all the union pointers should be in the same place: */
   pwl->entries[pwl->length - 1].value.building = NULL;
   pwl->length--;
 }
 
 /************************************************************************//**
-  Adds the id to the next available slot in the worklist.  'id' is the ID of
+  Adds the id to the next available slot in the worklist. 'id' is the ID of
   the unit/building to be produced; is_unit specifies whether it's a unit or
-  a building.  Returns TRUE if successful.
+  a building. Returns TRUE if successful.
 ****************************************************************************/
 bool worklist_append(struct worklist *pwl, const struct universal *prod)
 {
@@ -160,8 +160,8 @@ bool worklist_append(struct worklist *pwl, const struct universal *prod)
 
 /************************************************************************//**
   Inserts the production at the location idx in the worklist, thus moving
-  all subsequent entries down.  'id' specifies the unit/building to
-  be produced; is_unit tells whether it's a unit or building.  Returns TRUE
+  all subsequent entries down. 'id' specifies the unit/building to
+  be produced; is_unit tells whether it's a unit or building. Returns TRUE
   if successful.
 ****************************************************************************/
 bool worklist_insert(struct worklist *pwl, const struct universal *prod,
-- 
2.47.2

