int
mbx_open (char *file, int mbx_style, uid_t uid, gid_t gid, mode_t mode)
{
- int j, count, fd;
+ int j, count, fd = NOTOK;
struct stat st;
j = 0;
case ETXTBSY:
j = errno;
sleep (5);
- break;
+ continue;
default:
/* just return error */
}
while ((i = read (fd, buffer, sizeof(buffer))) > 0) {
+ /* valgrind noticed that stringdex depends on null
+ termination. */
+ buffer[i] = '\0';
+
for (j = 0;
(j = stringdex (mmdlm1, buffer)) >= 0;
buffer[j]++)