[dovecot/core] 660ecb: lib: [io]_stream_close(NULL) should be no-ops

GitHub noreply at github.com
Wed Nov 1 16:00:13 EET 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 660ecbaf80e6b3cf3a70ed1e0cdf7f8af6d895d0
      https://github.com/dovecot/core/commit/660ecbaf80e6b3cf3a70ed1e0cdf7f8af6d895d0
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-11-01 (Wed, 01 Nov 2017)

  Changed paths:
    M src/lib/istream.c
    M src/lib/ostream.c

  Log Message:
  -----------
  lib: [io]_stream_close(NULL) should be no-ops


  Commit: 9a84b90d894a741ae6e090de104d31382a41d0aa
      https://github.com/dovecot/core/commit/9a84b90d894a741ae6e090de104d31382a41d0aa
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-11-01 (Wed, 01 Nov 2017)

  Changed paths:
    M src/auth/auth-master-connection.c
    M src/auth/auth-postfix-connection.c
    M src/lib-smtp/lmtp-client.c
    M src/lib/connection.c
    M src/lib/istream-seekable.c
    M src/lib/istream.c
    M src/lib/ostream.c
    M src/login-common/client-common.c
    M src/replication/aggregator/notify-connection.c

  Log Message:
  -----------
  global: start relying on [io]_stream_close(NULL) being a no-op

Cleanup performed with the following semantic patch (and a bit of
hand-editing):

	@@
	expression E;
	@@

	- if (E != NULL) {
	- 	i_stream_close(E);
	- }
	+ i_stream_close(E);

	@@
	expression E;
	@@

	- if (E != NULL) {
	- 	o_stream_close(E);
	- }
	+ o_stream_close(E);


Compare: https://github.com/dovecot/core/compare/322400fb897c...9a84b90d894a


More information about the dovecot-cvs mailing list