Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/epan inet_ntop.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Oct 2001 20:55:11 -0500 (CDT)
guy         2001/10/27 20:55:11 CDT

  Modified files:
    epan                 inet_ntop.c 
  Log:
  Clean up another signed vs. unsigned comparison warning - if
  "snprintf()" returns a negative number, that's an error, and we assume
  "errno" was set and return NULL, otherwise we cast its return value to
  "size_t" and compare it with the size of the buffer we were given, and,
  if it was bigger, we know that "snprintf()" didn't generate all the
  characters it could be cause they wouldn't have fit, so we set "errno"
  to ENOSPC and return NULL.
  
  Revision  Changes    Path
  1.2       +6 -2      ethereal/epan/inet_ntop.c