[26250] in Source-Commits
Re: /svn/athena r25472 - in trunk/third/moira: clients/mailmaint
daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu May 3 15:59:22 2012
Message-ID: <4FA2E397.1050208@mit.edu>
Date: Thu, 03 May 2012 15:59:19 -0400
From: Greg Hudson <ghudson@MIT.EDU>
MIME-Version: 1.0
To: Jonathan Reed <jdreed@MIT.EDU>
CC: Geoffrey Thomas <geofft@MIT.EDU>, source-commits@MIT.EDU
In-Reply-To: <59FE1018-293E-4FE3-AF41-30C83372BAA9@mit.edu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
On 05/03/2012 03:55 PM, Jonathan Reed wrote:
> I'm not sure what you're objecting to, or what your alternative suggesting for fixing the error is. I may well be wrong, but this is unclear.
I will translate from C nerd.
>>> - com_err(program_name, status, "\nPress [RETURN] to continue");
>>> + com_err(program_name, status, "%s", "\nPress [RETURN] to continue");
>> Huh?
"This is a literal string. You shouldn't need to change it, should you?"
>>> sprintf(input, "Cannot open input file %s", argv[1]);
>>> - com_err("moira (script)", 0, input);
>>> + com_err("moira (script)", 0, "%s", input);
>> This seems a little redundant...
"Wouldn't it be better to eliminate the snprintf() call by bringing its
format string down into the com_err() call?"