getopt() and strdup() - Mailing list pgsql-hackers

From Bruce Momjian
Subject getopt() and strdup()
Date
Msg-id 20121008184026.GA28752@momjian.us
Whole thread Raw
Responses Re: getopt() and strdup()  (Andrew Dunstan <andrew@dunslane.net>)
Re: getopt() and strdup()  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [v9.3] Row-Level Security
Next
From: Gavin Flower
Date:
Subject: Re: Improving psql \ds