[12/13] lib: fwts_release: make some helper functions static
diff mbox series

Message ID 20180814112435.22166-13-colin.king@canonical.com
State Accepted
Headers show
Series
  • lib: minor code clean up
Related show

Commit Message

Colin King Aug. 14, 2018, 11:24 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

A couple of the helper functions don't need to be in global scope
so make them static.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_release.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Hung Aug. 14, 2018, 7:16 p.m. UTC | #1
On 2018-08-14 04:24 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> A couple of the helper functions don't need to be in global scope
> so make them static.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_release.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lib/src/fwts_release.c b/src/lib/src/fwts_release.c
> index ba827452..2358f953 100644
> --- a/src/lib/src/fwts_release.c
> +++ b/src/lib/src/fwts_release.c
> @@ -46,7 +46,7 @@ static void fwts_release_field_get(char *needle, char *delimiter, char *text, ch
>    *  fwts_release_get_debian()
>    *	return release for debian based systems
>    */
> -void fwts_release_get_debian(fwts_list *list, fwts_release *release)
> +static void fwts_release_get_debian(fwts_list *list, fwts_release *release)
>   {
>   	fwts_list_link *item;
>   
> @@ -64,7 +64,7 @@ void fwts_release_get_debian(fwts_list *list, fwts_release *release)
>    *  fwts_release_field_null
>    *	convert NULL fields to ""
>    */
> -void fwts_release_field_null_to_str(char **field)
> +static void fwts_release_field_null_to_str(char **field)
>   {
>   	if (*field == NULL)
>   		*field = strdup("");
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Aug. 16, 2018, 9:06 a.m. UTC | #2
On 08/14/2018 07:24 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> A couple of the helper functions don't need to be in global scope
> so make them static.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_release.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_release.c b/src/lib/src/fwts_release.c
> index ba827452..2358f953 100644
> --- a/src/lib/src/fwts_release.c
> +++ b/src/lib/src/fwts_release.c
> @@ -46,7 +46,7 @@ static void fwts_release_field_get(char *needle, char *delimiter, char *text, ch
>   *  fwts_release_get_debian()
>   *	return release for debian based systems
>   */
> -void fwts_release_get_debian(fwts_list *list, fwts_release *release)
> +static void fwts_release_get_debian(fwts_list *list, fwts_release *release)
>  {
>  	fwts_list_link *item;
>  
> @@ -64,7 +64,7 @@ void fwts_release_get_debian(fwts_list *list, fwts_release *release)
>   *  fwts_release_field_null
>   *	convert NULL fields to ""
>   */
> -void fwts_release_field_null_to_str(char **field)
> +static void fwts_release_field_null_to_str(char **field)
>  {
>  	if (*field == NULL)
>  		*field = strdup("");

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/lib/src/fwts_release.c b/src/lib/src/fwts_release.c
index ba827452..2358f953 100644
--- a/src/lib/src/fwts_release.c
+++ b/src/lib/src/fwts_release.c
@@ -46,7 +46,7 @@  static void fwts_release_field_get(char *needle, char *delimiter, char *text, ch
  *  fwts_release_get_debian()
  *	return release for debian based systems
  */
-void fwts_release_get_debian(fwts_list *list, fwts_release *release)
+static void fwts_release_get_debian(fwts_list *list, fwts_release *release)
 {
 	fwts_list_link *item;
 
@@ -64,7 +64,7 @@  void fwts_release_get_debian(fwts_list *list, fwts_release *release)
  *  fwts_release_field_null
  *	convert NULL fields to ""
  */
-void fwts_release_field_null_to_str(char **field)
+static void fwts_release_field_null_to_str(char **field)
 {
 	if (*field == NULL)
 		*field = strdup("");