Package: manpages
Version: 3.05-1
Severity: minor

The pthread_cond manual page includes the following code at the end:

  struct timeval now;
  struct timespec timeout;
  int retcode;

  pthread_mutex_lock(&mut);
  gettimeofday(&now);
  timeout.tv_sec = now.tv_sec + 5;
  timeout.tv_nsec = now.tv_usec * 1000;
  retcode = 0;
  while (x <= y && retcode != ETIMEDOUT) {
          retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
  }
  if (retcode == ETIMEDOUT) {
          /* timeout occurred */
  } else {
          /* operate on x and y */
  }
  pthread_mutex_unlock(&mut);

Note the 'gettimeofday' call.  gettimeofday(2) takes two arguments; that
call should be:

  gettimeofday(&now, NULL);

-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

manpages depends on no packages.

manpages recommends no packages.

Versions of packages manpages suggests:
ii  elvis-console [man-browser]   2.2.0-10   powerful clone of the vi/ex text e
ii  man-db [man-browser]          2.5.2-4    on-line manual pager

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to