Eliminate use of MIN().

This commit is contained in:
Andrew Cagney 2000-08-11 00:48:51 +00:00
parent 0e43f15b0c
commit 548a3e15c8
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2000-08-09 Andrew Cagney <cagney@lulu.cygnus.com>
* dv-sockser.c (dv_sockser_init): Eliminate MIN macro.
2000-07-27 Frank Ch. Eigler <fche@redhat.com>
From Maciej W. Rozycki <macro@ds2.pg.gda.pl>

View File

@ -74,7 +74,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#endif /* ! defined (FNBLOCK) */
#endif /* ! defined (O_NONBLOCK) */
#define MIN(a,b) ((a) < (b) ? (a) : (b))
/* Compromise between eating cpu and properly busy-waiting.
One could have an option to set this but for now that seems
@ -148,7 +147,9 @@ dv_sockser_init (SIM_DESC sd)
sockser_addr);
return SIM_RC_FAIL;
}
tmp = MIN (port_str - sockser_addr, (int) sizeof hostname - 1);
tmp = port_str - sockser_addr;
if (tmp >= sizeof hostname)
tmp = sizeof (hostname) - 1;
strncpy (hostname, sockser_addr, tmp);
hostname[tmp] = '\000';
port = atoi (port_str + 1);