Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 2002 16:13:05 -0700 (PDT)
From:      Thomas Moestl <tmm@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern subr_log.c
Message-ID:  <200210202313.g9KND5Om089921@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
tmm         2002/10/20 16:13:05 PDT

  Modified files:
    sys/kern             subr_log.c 
  Log:
  Fix the calculations of the length of the unread message buffer
  contents. The code was subtracting two unsigned ints, stored the
  result in a log and expected it to be the same as of a signed
  subtraction; this does only work on platforms where int and long
  have the same size (due to overflows).
  Instead, cast to long before the subtraction; the numbers are
  guaranteed to be small enough so that there will be no overflows
  because of that.
  
  Revision  Changes    Path
  1.51      +2 -2      src/sys/kern/subr_log.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210202313.g9KND5Om089921>