Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Gabriel Corona <gabriel.corona@enst-bretagne.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/2] Make gdbserver connect to SOCK_STREAM sockets
Date: Tue, 05 May 2015 03:01:00 -0000	[thread overview]
Message-ID: <20150505030125.GN30924@vapier> (raw)
In-Reply-To: <1430776463-23214-2-git-send-email-gabriel.corona@enst-bretagne.fr>

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-05-05  3:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 21:54 [PATCH v2 1/2] Use a shell command as a socket for gdbserver Gabriel Corona
2015-05-04 21:54 ` [PATCH v2 2/2] Make gdbserver connect to SOCK_STREAM sockets Gabriel Corona
2015-05-05  3:01   ` Mike Frysinger [this message]
2015-05-05  2:58 ` [PATCH v2 1/2] Use a shell command as a socket for gdbserver Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150505030125.GN30924@vapier \
    --to=vapier@gentoo.org \
    --cc=gabriel.corona@enst-bretagne.fr \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox