Remove some defined statements
This commit is contained in:
parent
c3b134f3b7
commit
3e77b4e954
@ -134,10 +134,6 @@
|
|||||||
#define _PATH_INETDCONF "/etc/inetd.conf"
|
#define _PATH_INETDCONF "/etc/inetd.conf"
|
||||||
#define _PATH_INETDPID "/var/run/inetd.pid"
|
#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 TOOMANY 40 /* don't start more than TOOMANY */
|
||||||
#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
|
#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
|
||||||
#define RETRYTIME (60*10) /* retry after bind or server fail */
|
#define RETRYTIME (60*10) /* retry after bind or server fail */
|
||||||
@ -270,11 +266,8 @@ static const struct biltin biltins[] = {
|
|||||||
};
|
};
|
||||||
#endif /* INETD_FEATURE_ENABLED */
|
#endif /* INETD_FEATURE_ENABLED */
|
||||||
|
|
||||||
#define NUMINT (sizeof(intab) / sizeof(struct inent))
|
|
||||||
static const char *CONFIG = _PATH_INETDCONF;
|
static const char *CONFIG = _PATH_INETDCONF;
|
||||||
|
|
||||||
#define BCOPY(s, d, z) memcpy(d, s, z)
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
syslog_err_and_discard_dg(int se_socktype, const char *msg, ...)
|
syslog_err_and_discard_dg(int se_socktype, const char *msg, ...)
|
||||||
__attribute__ ((noreturn, format (printf, 2, 3)));
|
__attribute__ ((noreturn, format (printf, 2, 3)));
|
||||||
@ -519,7 +512,7 @@ bump_nofile(void)
|
|||||||
syslog(LOG_ERR, "getrlimit: %m");
|
syslog(LOG_ERR, "getrlimit: %m");
|
||||||
return -1;
|
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) {
|
if (rl.rlim_cur <= rlim_ofile_cur) {
|
||||||
syslog(LOG_ERR,
|
syslog(LOG_ERR,
|
||||||
#if _FILE_OFFSET_BITS == 64
|
#if _FILE_OFFSET_BITS == 64
|
||||||
@ -1142,10 +1135,10 @@ chargen_stream(int s, struct servtab *sep)
|
|||||||
text[LINESIZ + 1] = '\n';
|
text[LINESIZ + 1] = '\n';
|
||||||
for (rs = ring;;) {
|
for (rs = ring;;) {
|
||||||
if ((len = endring - rs) >= LINESIZ)
|
if ((len = endring - rs) >= LINESIZ)
|
||||||
BCOPY(rs, text, LINESIZ);
|
memcpy(rs, text, LINESIZ);
|
||||||
else {
|
else {
|
||||||
BCOPY(rs, text, len);
|
memcpy(rs, text, len);
|
||||||
BCOPY(ring, text + len, LINESIZ - len);
|
memcpy(ring, text + len, LINESIZ - len);
|
||||||
}
|
}
|
||||||
if (++rs == endring)
|
if (++rs == endring)
|
||||||
rs = ring;
|
rs = ring;
|
||||||
@ -1176,10 +1169,10 @@ chargen_dg(int s, struct servtab *sep)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ((len = endring - rs) >= LINESIZ)
|
if ((len = endring - rs) >= LINESIZ)
|
||||||
BCOPY(rs, text, LINESIZ);
|
memcpy(rs, text, LINESIZ);
|
||||||
else {
|
else {
|
||||||
BCOPY(rs, text, len);
|
memcpy(rs, text, len);
|
||||||
BCOPY(ring, text + len, LINESIZ - len);
|
memcpy(ring, text + len, LINESIZ - len);
|
||||||
}
|
}
|
||||||
if (++rs == endring)
|
if (++rs == endring)
|
||||||
rs = ring;
|
rs = ring;
|
||||||
|
Loading…
Reference in New Issue
Block a user