getopt() and strdup()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: getopt() and strdup()
Date: 2012-10-08 18:40:26
Message-ID: 20121008184026.GA28752@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A while ago I noticed that in some places we strdup/pg_strdup() optarg
strings from getopt(), and in some places we don't.

If we needed the strdup(), the missing cases should generate errors. If
we don't need them, the strdup() is unnecessary, and research confirms
they are unnecessary. Should we remove the extra strdup/pg_strdup()
calls, for consistency.

I think we might have had old platforms that required it, but none are
still supported today.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2012-10-08 18:57:38 Re: Improving psql \ds
Previous Message Dean Rasheed 2012-10-08 18:33:13 Re: [v9.3] Row-Level Security