~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_write.c

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
        /* Write a chunk of bytes to a file */
22
22
 
23
 
size_t my_write(int Filedes, const unsigned char *Buffer, size_t Count, myf MyFlags)
 
23
size_t my_write(int Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
24
24
{
25
25
  size_t writenbytes, written;
26
 
  uint32_t errors;
 
26
  uint errors;
27
27
  errors=0; written=0;
28
28
 
29
29
  /* The behavior of write(fd, buf, 0) is not portable */
50
50
      if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
51
51
        my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
52
52
                 my_filename(Filedes),my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
53
 
      sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
 
53
      VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
54
54
      continue;
55
55
    }
56
56