diff mbox series

[v2] Fixed compiler error for delta updates

Message ID 20220331173039.12932-1-bstruempfel@ultratronik.de
State Accepted
Headers show
Series [v2] Fixed compiler error for delta updates | expand

Commit Message

Börge Strümpfel March 31, 2022, 5:30 p.m. UTC
Compiling swupdate with CONFIG_DELTA enabled but CONFIG_MONGOOSE
disabled led to a compiler error.

The variables ac and av are not being declared when not using
mongoose. This resulted in compile-time errors. Switched to using
dwlav and dwlac instead, since both variables in question are unused by
start_delta_downloader and dwlav and dwlac are always declared.

Signed-off-by: Börge Strümpfel <bstruempfel@ultratronik.de>
---
Changes since v1:
- use 0 and NULL instead of using dwlav and dwlac in order to make it
clearer, that these values are unused. (Change proposed by Stefano Babic)
---
 core/swupdate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic April 1, 2022, 12:34 p.m. UTC | #1
On 31.03.22 19:30, Börge Strümpfel wrote:
> Compiling swupdate with CONFIG_DELTA enabled but CONFIG_MONGOOSE
> disabled led to a compiler error.
> 
> The variables ac and av are not being declared when not using
> mongoose. This resulted in compile-time errors. Switched to using
> dwlav and dwlac instead, 

I removed this sentence becasue dwl[ac|av] are not used to fix it.

> since both variables in question are unused by
> start_delta_downloader and dwlav and dwlac are always declared.
> 
> Signed-off-by: Börge Strümpfel <bstruempfel@ultratronik.de>
> ---
> Changes since v1:
> - use 0 and NULL instead of using dwlav and dwlac in order to make it
> clearer, that these values are unused. (Change proposed by Stefano Babic)
> ---
>   core/swupdate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/core/swupdate.c b/core/swupdate.c
> index b59e0eb..15b6dc4 100644
> --- a/core/swupdate.c
> +++ b/core/swupdate.c
> @@ -860,7 +860,7 @@ int main(int argc, char **argv)
>   		gid_t gid;
>   		read_settings_user_id(&handle, "download", &uid, &gid);
>   		start_subprocess(SOURCE_CHUNKS_DOWNLOADER, "chunks_downloader", uid, gid,
> -				cfgfname, ac, av,
> +				cfgfname, 0, NULL,
>   				start_delta_downloader);
>   	}
>   #endif

Applied to -master, thanks !


Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/core/swupdate.c b/core/swupdate.c
index b59e0eb..15b6dc4 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -860,7 +860,7 @@  int main(int argc, char **argv)
 		gid_t gid;
 		read_settings_user_id(&handle, "download", &uid, &gid);
 		start_subprocess(SOURCE_CHUNKS_DOWNLOADER, "chunks_downloader", uid, gid,
-				cfgfname, ac, av,
+				cfgfname, 0, NULL,
 				start_delta_downloader);
 	}
 #endif