[26253] in Source-Commits
/svn/athena r25474 - in trunk/third/moira/clients: moira mrtest
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu May 3 16:09:57 2012
Date: Thu, 3 May 2012 16:09:55 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201205032009.q43K9tmg014185@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-05-03 16:09:55 -0400 (Thu, 03 May 2012)
New Revision: 25474
Modified:
trunk/third/moira/clients/moira/main.c
trunk/third/moira/clients/mrtest/mrtest.c
Log:
Remove unnecessary format string in clients/moira/main.c
Eliminate unnecessary sprintf
Modified: trunk/third/moira/clients/moira/main.c
===================================================================
--- trunk/third/moira/clients/moira/main.c 2012-05-03 19:51:15 UTC (rev 25473)
+++ trunk/third/moira/clients/moira/main.c 2012-05-03 20:09:55 UTC (rev 25474)
@@ -116,7 +116,7 @@
if (status == MR_USER_AUTH)
{
char buf[BUFSIZ];
- com_err(program_name, status, "%s", "\nPress [RETURN] to continue");
+ com_err(program_name, status, "\nPress [RETURN] to continue");
fgets(buf, BUFSIZ, stdin);
}
else
Modified: trunk/third/moira/clients/mrtest/mrtest.c
===================================================================
--- trunk/third/moira/clients/mrtest/mrtest.c 2012-05-03 19:51:15 UTC (rev 25473)
+++ trunk/third/moira/clients/mrtest/mrtest.c 2012-05-03 20:09:55 UTC (rev 25474)
@@ -372,8 +372,7 @@
inp = fopen(argv[1], "r");
if (!inp)
{
- sprintf(input, "Cannot open input file %s", argv[1]);
- com_err("moira (script)", 0, "%s", input);
+ com_err("moira (script)", 0, "Cannot open input file %s", argv[1]);
return;
}
@@ -389,8 +388,7 @@
close(status);
dup2(oldstdout, 1);
argc = 2;
- sprintf(input, "Unable to redirect output to %s\n", argv[2]);
- com_err("moira (script)", errno, "%s", input);
+ com_err("moira (script)", errno, "Unable to redirect output to %s\n", argv[2]);
}
else
{