This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
On 04 May 2015 23:54, Gabriel Corona wrote: > +static int > +socket_open (char *name) const > + int sock; > + struct sockaddr_un addr; > + > + if (strlen (name) >= sizeof (addr.sun_path)) > + return -1; > + sock = socket (AF_UNIX, SOCK_STREAM, 0); prefer a blank line before the socket() > + if (sock < 0) > + return -1; > + > + addr.sun_family = AF_UNIX; > + strcpy (addr.sun_path, name); > + if (connect (sock, (const struct sockaddr *) &addr, > + sizeof (struct sockaddr_un)) < 0) > + { > + close (sock); > + return -1; > + } > + return sock; > +} blank line above this last return statement -mike
Attachment:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |