[BusyBox-cvs] busybox/networking inetd.c,1.8,1.9
Glenn McGrath
bug1 at busybox.net
Sat Jan 17 01:44:35 UTC 2004
Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv31333/networking
Modified Files:
inetd.c
Log Message:
Remove some defined statements
Index: inetd.c
===================================================================
RCS file: /var/cvs/busybox/networking/inetd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- inetd.c 17 Jan 2004 01:26:53 -0000 1.8
+++ inetd.c 17 Jan 2004 01:44:32 -0000 1.9
@@ -134,10 +134,6 @@
#define _PATH_INETDCONF "/etc/inetd.conf"
#define _PATH_INETDPID "/var/run/inetd.pid"
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
#define TOOMANY 40 /* don't start more than TOOMANY */
#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
#define RETRYTIME (60*10) /* retry after bind or server fail */
@@ -270,11 +266,8 @@
};
#endif /* INETD_FEATURE_ENABLED */
-#define NUMINT (sizeof(intab) / sizeof(struct inent))
static const char *CONFIG = _PATH_INETDCONF;
-#define BCOPY(s, d, z) memcpy(d, s, z)
-
static void
syslog_err_and_discard_dg(int se_socktype, const char *msg, ...)
__attribute__ ((noreturn, format (printf, 2, 3)));
@@ -519,7 +512,7 @@
syslog(LOG_ERR, "getrlimit: %m");
return -1;
}
- rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK);
+ rl.rlim_cur = rl.rlim_max < (rl.rlim_cur + FD_CHUNK) ? rl.rlim_max : (rl.rlim_cur + FD_CHUNK);
if (rl.rlim_cur <= rlim_ofile_cur) {
syslog(LOG_ERR,
#if _FILE_OFFSET_BITS == 64
@@ -1142,10 +1135,10 @@
text[LINESIZ + 1] = '\n';
for (rs = ring;;) {
if ((len = endring - rs) >= LINESIZ)
- BCOPY(rs, text, LINESIZ);
+ memcpy(rs, text, LINESIZ);
else {
- BCOPY(rs, text, len);
- BCOPY(ring, text + len, LINESIZ - len);
+ memcpy(rs, text, len);
+ memcpy(ring, text + len, LINESIZ - len);
}
if (++rs == endring)
rs = ring;
@@ -1176,10 +1169,10 @@
return;
if ((len = endring - rs) >= LINESIZ)
- BCOPY(rs, text, LINESIZ);
+ memcpy(rs, text, LINESIZ);
else {
- BCOPY(rs, text, len);
- BCOPY(ring, text + len, LINESIZ - len);
+ memcpy(rs, text, len);
+ memcpy(ring, text + len, LINESIZ - len);
}
if (++rs == endring)
rs = ring;
More information about the busybox-cvs
mailing list