linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] toml: fix misleading identation
@ 2020-04-17 21:16 Rosen Penev
  2020-04-20 12:44 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2020-04-17 21:16 UTC (permalink / raw)
  To: linux-media

Found with gcc's -Wmisleading-indentation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/common/toml.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/common/toml.c b/utils/common/toml.c
index dc9868a2..68cebef9 100644
--- a/utils/common/toml.c
+++ b/utils/common/toml.c
@@ -1697,7 +1697,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
         for (i = 0; i < 10; i++, p++) {
             int xx = *p;
             if (xx == '-') {
-                if (i == 4 || i == 7) continue; return -1;
+                if (i == 4 || i == 7) continue;
+                return -1;
             }
             if (! ('0' <= xx && xx <= '9')) return -1;
             val = val * 10 + (xx - '0');
@@ -1724,7 +1725,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
     for (i = 0; i < 8; i++, p++) {
         int xx = *p;
         if (xx == ':') {
-            if (i == 2 || i == 5) continue; return -1;
+            if (i == 2 || i == 5) continue;
+            return -1;
         }
         if (! ('0' <= xx && xx <= '9')) return -1;
         val = val * 10 + (xx - '0');
-- 
2.25.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] toml: fix misleading identation
  2020-04-17 21:16 [PATCH] toml: fix misleading identation Rosen Penev
@ 2020-04-20 12:44 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2020-04-20 12:44 UTC (permalink / raw)
  To: Rosen Penev, linux-media

On 17/04/2020 23:16, Rosen Penev wrote:
> Found with gcc's -Wmisleading-indentation
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

I've merged this with the '[PATCH] treewide: do not use return after else'
patch.

I'll still mark it as Accepted in patchwork, though.

Regards,

	Hans

> ---
>  utils/common/toml.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/common/toml.c b/utils/common/toml.c
> index dc9868a2..68cebef9 100644
> --- a/utils/common/toml.c
> +++ b/utils/common/toml.c
> @@ -1697,7 +1697,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
>          for (i = 0; i < 10; i++, p++) {
>              int xx = *p;
>              if (xx == '-') {
> -                if (i == 4 || i == 7) continue; return -1;
> +                if (i == 4 || i == 7) continue;
> +                return -1;
>              }
>              if (! ('0' <= xx && xx <= '9')) return -1;
>              val = val * 10 + (xx - '0');
> @@ -1724,7 +1725,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
>      for (i = 0; i < 8; i++, p++) {
>          int xx = *p;
>          if (xx == ':') {
> -            if (i == 2 || i == 5) continue; return -1;
> +            if (i == 2 || i == 5) continue;
> +            return -1;
>          }
>          if (! ('0' <= xx && xx <= '9')) return -1;
>          val = val * 10 + (xx - '0');
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-20 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 21:16 [PATCH] toml: fix misleading identation Rosen Penev
2020-04-20 12:44 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).