[PATCH 1/8] pretty: tighten function signature to not take `void *`

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

 



We take a `void *` and immediately cast it. Both callers already have
this pointer as the right type, so tighten the interface and stop
casting.

Signed-off-by: Martin Ågren <martin.agren@xxxxxxxxx>
---
 pretty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pretty.c b/pretty.c
index 0bc8ad8a9a..a4e5fc5c50 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1437,9 +1437,8 @@ static void free_decoration_options(const struct decoration_options *opts)
 
 static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
 				const char *placeholder,
-				void *context)
+				struct format_commit_context *c)
 {
-	struct format_commit_context *c = context;
 	const struct commit *commit = c->commit;
 	const char *msg = c->message;
 	struct commit_list *p;
-- 
2.49.0.472.ge94155a9ec





[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