Re: sockaddr_un.sun_len vs. reality

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-23T03:43:14Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> I was nerd-sniped by the historical context of this single line of
> code.  I'd already wondered many times (not just in PostgreSQL)
> whether and when that became a cargo-cult practice, replicated from
> other software and older books like Stevens.  I failed to find any
> sign of an OS that needs it today, or likely even needed it this
> millennium.  Now I'd like to propose removing it.

Seems worth a try.

			regards, tom lane



Commits

  1. Don't bother to set sockaddr_un.sun_len.

  2. Suppress integer-overflow compiler warning for inconsistent sun_len.