<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks, Hitoshi<br><br>Will follow the link and send the updated patch later.<br><br>Roy<br><br><div>> Date: Sat, 14 Mar 2015 00:52:16 +0900<br>> Subject: Re: [sheepdog] Duplicated line at lib/net.c:519<br>> From: mitake.hitoshi@gmail.com<br>> To: bsdnet@outlook.com<br>> CC: sheepdog@lists.wpkg.org<br>> <br>> On Fri, Mar 13, 2015 at 2:04 PM, Roy Yang <bsdnet@outlook.com> wrote:<br>> > While browsing the source of sheepdog,  seems those two lines are the same:<br>> ><br>> > memcpy(bytes + 12, &sin->sin_addr, 4);<br>> > memcpy(bytes + 12, &sin->sin_addr, 4);<br>> ><br>> > Attached patch is to remove the duplicated line if this is a minor bug.<br>> ><br>> > From 4f5fc977ea12e2048fc025b66fbbeea9c411157d Mon Sep 17 00:00:00 2001<br>> > From: Roy Yang <ryang@ryang-dt.(none)><br>> > Date: Thu, 12 Mar 2015 21:39:00 -0700<br>> > Subject: [PATCH] Remove the duplicated code line<br>> ><br>> > Signed-off-by: Roy Yang <bsdnet@outlook.com><br>> > ---<br>> >  lib/net.c |    1 -<br>> >  1 files changed, 0 insertions(+), 1 deletions(-)<br>> <br>> Seems that your change is correct but the style should be changed a<br>> little bit (e.g. placement of commit log). Could you follow the below<br>> guide line?<br>> <br>> https://github.com/sheepdog/sheepdog/wiki/Submit-a-patch<br>> <br>> Thanks,<br>> Hitoshi<br>> <br>> ><br>> > diff --git a/lib/net.c b/lib/net.c<br>> > index 5b34a1c..6e84937 100644<br>> > --- a/lib/net.c<br>> > +++ b/lib/net.c<br>> > @@ -519,7 +519,6 @@ int get_local_addr(uint8_t *bytes)<br>> >                         sin = (struct sockaddr_in *)ifa->ifa_addr;<br>> >                         memset(bytes, 0, 12);<br>> >                         memcpy(bytes + 12, &sin->sin_addr, 4);<br>> > -                       memcpy(bytes + 12, &sin->sin_addr, 4);<br>> >                         sd_notice("found IPv4 address");<br>> >                         goto out;<br>> >                 case AF_INET6:<br>> > --<br>> > 1.7.2.3<br>> ><br>> ><br>> > Cheers,<br>> ><br>> > Roy<br>> ><br>> > --<br>> > sheepdog mailing list<br>> > sheepdog@lists.wpkg.org<br>> > https://lists.wpkg.org/mailman/listinfo/sheepdog<br>> ><br></div>                                          </div></body>
</html>