lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/24] perf daemon: Add server socket support
Em Thu, Feb 04, 2021 at 03:49:36PM +0100, Jiri Olsa escreveu:
> On Wed, Feb 03, 2021 at 06:04:23PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Sun, Jan 31, 2021 at 12:48:36AM +0100, Jiri Olsa escreveu:
> > > +static int setup_server_socket(struct daemon *daemon)
> > > +{
> > > + struct sockaddr_un addr;
> > > + char path[100];
> > > + int fd;
> > > +
> > > + fd = socket(AF_UNIX, SOCK_STREAM, 0);
> >
> > Minor, combine decl with use, since line isn't long and its one after
> > the other, i.e.:
> >
> > int fd = socket(AF_UNIX, SOCK_STREAM, 0);
>
> hum, sure, but I'm missing the point.. I think it's less readable

one line instead of three :-)

> >
> > > + if (fd < 0) {
> > > + fprintf(stderr, "socket: %s\n", strerror(errno));
> > > + return -1;

- Arnaldo

\
 
 \ /
  Last update: 2021-02-04 16:57    [W:0.085 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site