postgresql/src/common
Tom Lane 930b785d40 Minor cleanup/future-proofing for pg_saslprep().
Ensure that pg_saslprep() initializes its output argument to NULL in
all failure paths, and then remove the redundant initialization that
some (not all) of its callers did.  This does not fix any live bug,
but it reduces the odds of future bugs of omission.

Also add a comment about why the existing failure-path coding is
adequate.

Back-patch so as to keep the function's API consistent across branches,
again to forestall future bug introduction.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/16558.1536407783@sss.pgh.pa.us
2018-09-08 18:20:36 -04:00
..
unicode Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
base64.c Fix comments in SCRAM-SHA-256 patch. 2017-03-07 15:24:27 +02:00
config_info.c Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
controldata_utils.c Adjust error message 2018-08-06 10:53:51 +02:00
exec.c Enlarge find_other_exec's meager fgets buffer 2018-04-19 10:45:15 -03:00
fe_memutils.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
file_utils.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
ip.c Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:32 -04:00
keywords.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
md5.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pg_lzcompress.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pgfnames.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
psprintf.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
relpath.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
restricted_token.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
rmtree.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
saslprep.c Minor cleanup/future-proofing for pg_saslprep(). 2018-09-08 18:20:36 -04:00
scram-common.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
sha2.c Update copyright in recently added files 2017-07-26 18:17:18 -04:00
sha2_openssl.c Update copyright in recently added files 2017-07-26 18:17:18 -04:00
string.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
unicode_norm.c Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
username.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
wait_error.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00