Fix the synopsis of pg_md5_hash

Started by Tatsuro Yamadaalmost 2 years ago4 messages
#1Tatsuro Yamada
tatsuro.yamada@ntt.com
1 attachment(s)

Hi,

The synopsis of pg_md5_hash() seems wrong such as:
- s/int/bool/
- "errstr" is missing
So, I created a patch to fix them.

src/common/md5_common.c
==================================================
* SYNOPSIS #include "md5.h"
* int pg_md5_hash(const void *buff, size_t len, char *hexsum)
...
bool
pg_md5_hash(const void *buff, size_t len, char *hexsum, const char **errstr)
==================================================

Please find attached file.

Regards,
Tatsuro Yamada
NTT Open Source Software Center

Attachments:

fix_synopsis_of_pg_md5_hash.patchapplication/octet-stream; name=fix_synopsis_of_pg_md5_hash.patchDownload
diff --git a/src/common/md5_common.c b/src/common/md5_common.c
index 094878479c..c654efe971 100644
--- a/src/common/md5_common.c
+++ b/src/common/md5_common.c
@@ -45,7 +45,8 @@ bytesToHex(uint8 b[16], char *s)
  *	Calculates the MD5 sum of the bytes in a buffer.
  *
  *	SYNOPSIS	  #include "md5.h"
- *				  int pg_md5_hash(const void *buff, size_t len, char *hexsum)
+ *				  bool pg_md5_hash(const void *buff, size_t len, char *hexsum,
+ *				                   const char **errstr)
  *
  *	INPUT		  buff	  the buffer containing the bytes that you want
  *						  the MD5 sum of.
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Tatsuro Yamada (#1)
Re: Fix the synopsis of pg_md5_hash

On 14 Mar 2024, at 07:02, Tatsuro Yamada <tatsuro.yamada@ntt.com> wrote:

So, I created a patch to fix them.

Thanks, applied.

--
Daniel Gustafsson

#3Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#2)
Re: Fix the synopsis of pg_md5_hash

On Thu, Mar 14, 2024 at 09:32:55AM +0100, Daniel Gustafsson wrote:

On 14 Mar 2024, at 07:02, Tatsuro Yamada <tatsuro.yamada@ntt.com> wrote:

So, I created a patch to fix them.

Thanks, applied.

Oops. Thanks.
--
Michael

#4Tatsuro Yamada
yamatattsu@gmail.com
In reply to: Michael Paquier (#3)
Re: Fix the synopsis of pg_md5_hash

Hi, Daniel and Michael,

On Thu, Mar 14, 2024 at 09:32:55AM +0100, Daniel Gustafsson wrote:

On 14 Mar 2024, at 07:02, Tatsuro Yamada <tatsuro.yamada@ntt.com> wrote:

So, I created a patch to fix them.

Thanks, applied.

Oops. Thanks.
--
Michael

Thank you guys!

Regards,
Tatsuro Yamada
NTT Open Source Software Center