X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id F1A7DDC15D9 for ; Wed, 29 Jul 2015 00:11:46 +0000 (UTC) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id BE1A5DC1085 for ; Wed, 29 Jul 2015 00:11:46 +0000 (UTC) Received: by pdbnt7 with SMTP id nt7so78677284pdb.0 for ; Tue, 28 Jul 2015 17:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=i3tkAUSplNdwX4g75RlAa5FDpAYIegVR0A4ZrVSBqrU=; b=MsBW8SfIwHYZWGEtKBb4DZrcubfZcTS0KCxn+RN9iMynbtGHZgCN6ph7BTzr0Mv6a+ RSswgIUbPy17uoZkr9he+6IiPHOKlGnOUqcYgRtO17u9KPPQDcAiUF86iHheEL5LPiv9 tVwbdfYEpdlpJCkB5XUDRIdOF/SQgO3ZhA2uigBz8XqmRqwY4Rb6kXqQwd1hzCFCmL+u 4bvCJA8mdF5JU/EMi2ECmPRk9A10j0vhmM/qhxA78OEXaid9qLvhPQASUdwRkDpxhe1v oQ9uEDVtjmMkZL2evnjzbR3LvxfZlVcVWkKQhIuIPhu9x1mA5jV1JiHTwnZawbictRAo L89w== X-Received: by 10.70.90.193 with SMTP id by1mr86474446pdb.80.1438128705587; Tue, 28 Jul 2015 17:11:45 -0700 (PDT) Received: from newbook ([50.0.227.100]) by smtp.gmail.com with ESMTPSA id cj7sm37230444pdb.33.2015.07.28.17.11.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 17:11:45 -0700 (PDT) Date: Tue, 28 Jul 2015 17:12:07 -0700 From: Isaac Dunham To: =?iso-8859-1?Q?S=F6ren?= Tempel Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH 3/3] main/ssmtp: fix usage of getaddrinfo Message-ID: <20150729001206.GB1924@newbook> References: <1438021564-7176-1-git-send-email-soeren+git@soeren-tempel.net> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1438021564-7176-1-git-send-email-soeren+git@soeren-tempel.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jul 27, 2015 at 08:26:04PM +0200, S=F6ren Tempel wrote: > diff --git a/main/ssmtp/inet6-getaddrinfo.patch b/main/ssmtp/inet6-getadd= rinfo.patch > +++ b/main/ssmtp/inet6-getaddrinfo.patch > @@ -0,0 +1,12 @@ > +diff -up ssmtp.orig/ssmtp.c ssmtp/ssmtp.c > +--- ssmtp.orig/ssmtp.c 2009-11-23 10:55:11.000000000 +0100 > ++++ ssmtp/ssmtp.c 2015-07-27 17:34:12.498140804 +0200 > +@@ -1157,7 +1157,7 @@ int smtp_open(char *host, int port) > + snprintf(servname, sizeof(servname), "%d", port); > +=20 > + /* Check we can reach the host */ > +- if (getaddrinfo(host, servname, &hints, &ai0)) { > ++ if (getaddrinfo(host, servname, &hints, &ai0) !=3D 0) { > + log_event(LOG_ERR, "Unable to locate %s", host); > + return(-1); > + } I'm wondering what this is supposed to do. In C, "if (function(args))" means "if ((function(args)) !=3D 0)", so the change doesn't mean anything different. Thanks, Isaac Dunham --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---