Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]
From: Joseph S D Yao (jsdy@center.osis.gov)
Date: 07/23/02
- Next message: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Previous message: Marc DVer: "[fw-wiz] Securing a Linux Firewall"
- In reply to: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Next in thread: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Reply: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Reply: Darren Reed: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Joseph S D Yao <jsdy@center.osis.gov> To: Carson Gaspar <carson@taltos.org> Date: Tue Jul 23 12:07:01 2002
Oh, geez, shouldn't everyone have written [something like] this?
register char *cp = buf;
register int i, count = n;
for (;;) {
i = write(fd, cp, count);
if (i < 0) {
perror("...");
fprintf(stderr, ...);
break;
}
count -= i;
if (count <= 0) /* yes, should never be <, optionally fuss */
break;
cp += i;
if (i == 0 {
sleep(1);
/* should probably count and break if too many */
}
}
-- Joe Yao jsdy@center.osis.gov - Joseph S. D. Yao OSIS Center Systems Support EMT-B ----------------------------------------------------------------------- This message is not an official statement of OSIS Center policies.
- Next message: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Previous message: Marc DVer: "[fw-wiz] Securing a Linux Firewall"
- In reply to: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Next in thread: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Reply: Carson Gaspar: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Reply: Darren Reed: "Re: [fw-wiz] Code reviews [Was: FWTK and smap/smapd]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|