rem: writefd_unbuffered(fd, buf, len);
add: if (len) { writefd_unbuffered(fd, buf, len); }
context: static void mplex_write(int fd, enum logcode code, char *buf, int len){	char buffer[4096];	int n = len;	SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len);	if (n > (sizeof(buf)-4)) {		n = sizeof(buf)-4;	}	memcpy(&buffer[4], buf, n);	writefd_unbuffered(fd, buffer, n+4);	len -= n;	buf += n;	writefd_unbuffered(fd, buf, len);}