Message ID | 20200929113358.49094-1-christian.storm@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | tools: swupdate-sendtohawkbit: Fix JSON string for 'details' | expand |
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 --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, "}");
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(-)