This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/345] New: getsockname returns a value different of zero when successful


When calling the function getsockname, errno shows Successful, but the value
returned is not zero, but different instead.

I have tested this on versions 2.3.2 (Debian) and 2.3.4 (Gentoo) with that
behaviour.

>From man 2 getsockname:

NAME
       getsockname - get socket name

SYNOPSIS
       #include <sys/socket.h>

       int getsockname(int s, struct sockaddr *name, socklen_t *namelen);

DESCRIPTION
       Getsockname  returns  the  current  name for the specified socket.  The
       namelen parameter should be initialized to indicate the amount of space
       pointed  to by name.  On return it contains the actual size of the name
       returned (in bytes).

RETURN VALUE
       On success, zero is returned.  On error, -1 is returned, and  errno  is
       set appropriately.

-- 
           Summary: getsockname returns a value different of zero when
                    successful
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P1
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: aioannis at tinet dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=345

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]