Re: [PATCH v3 3/3] strbuf: convert predicates to return bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

> From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
>
> Now that the string predicates defined in git-compat-util.h all
> return bool let's convert the return type of the string predicates
> in strbuf.{c,h} to match them.
>
> Signed-off-by: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
> ---
>  strbuf.c | 28 ++++++++++++++--------------
>  strbuf.h | 12 ++++++------
>  2 files changed, 20 insertions(+), 20 deletions(-)
>

Nit: same here as the previous patch

$ ./ci/run-style-check.sh @~1
diff --git a/strbuf.c b/strbuf.c
index 6c3851a7f8..d9e040c13b 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -38,7 +38,7 @@ bool starts_with_mem(const char *str, size_t len,
const char *prefix)
 }

 bool skip_to_optional_arg_default(const char *str, const char *prefix,
-				 const char **arg, const char *def)
+				  const char **arg, const char *def)
 {
 	const char *p;

diff --git a/strbuf.h b/strbuf.h
index a580ac6084..d2ff9839a9 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -679,10 +679,10 @@ bool starts_with_mem(const char *str, size_t
len, const char *prefix);
  * skip_prefix(arg, "--key=", &arg) to parse such an option.
  */
 bool skip_to_optional_arg_default(const char *str, const char *prefix,
-				 const char **arg, const char *def);
+				  const char **arg, const char *def);

 static inline bool skip_to_optional_arg(const char *str, const char *prefix,
-				       const char **arg)
+					const char **arg)
 {
 	return skip_to_optional_arg_default(str, prefix, arg, "");
 }

[snip]

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux