diff mbox series

tools: swupdate-sendtohawkbit: Fix JSON string for 'details'

Message ID 20200929113358.49094-1-christian.storm@siemens.com
State Accepted
Headers show
Series tools: swupdate-sendtohawkbit: Fix JSON string for 'details' | expand

Commit Message

Storm, Christian Sept. 29, 2020, 11:33 a.m. UTC
Only close JSON array if "details" are given on command line.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 tools/swupdate-sendtohawkbit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Oct. 1, 2020, 9:38 a.m. UTC | #1
On 29.09.20 13:33, Christian Storm wrote:
> Only close JSON array if "details" are given on command line.
> 
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>  tools/swupdate-sendtohawkbit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/swupdate-sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c
> index 59ff4ad..0c65ce4 100644
> --- a/tools/swupdate-sendtohawkbit.c
> +++ b/tools/swupdate-sendtohawkbit.c
> @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
>  			break;
>  	}
>  
> -	if (i > 4)
> +	if (i > 5)
>  		written = snprintf(buf, size, "]}");
>  	else
>  		written = snprintf(buf, size, "}");
> 

Applied to -master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/tools/swupdate-sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c
index 59ff4ad..0c65ce4 100644
--- a/tools/swupdate-sendtohawkbit.c
+++ b/tools/swupdate-sendtohawkbit.c
@@ -86,7 +86,7 @@  int main(int argc, char *argv[]) {
 			break;
 	}
 
-	if (i > 4)
+	if (i > 5)
 		written = snprintf(buf, size, "]}");
 	else
 		written = snprintf(buf, size, "}");