[26254] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25474 - in trunk/third/moira/clients: moira

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Thu May 3 16:11:06 2012

Date: Thu, 3 May 2012 16:11:03 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201205032009.q43K9tmg014185@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1205031610480.27539@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

ACK.  Thanks.
-Ben

On Thu, 3 May 2012, Jonathan D Reed wrote:

> 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
> 	{
>
>

home help back first fref pref prev next nref lref last post