[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

oops? read/write vs type of length parameter

From: Jim Meyering
Subject: oops? read/write vs type of length parameter
Date: Mon, 11 Apr 2011 10:55:35 +0200

Hi Eli,

In http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/103883
you adjusted the signatures of emacs_read and emacs_write.

  - extern int emacs_read (int, char *, unsigned int);
  - extern int emacs_write (int, const char *, unsigned int);
  + extern ssize_t emacs_read (int, char *, ssize_t);
  + extern ssize_t emacs_write (int, const char *, ssize_t);

It's good to see that you corrected the return type to be wider
(ssize_t) and still signed, just like "int".

However, did you really intend to make the buffer length parameters signed?
I would have expected those to be of type size_t, not ssize_t.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]