From owner-svn-src-head@freebsd.org Thu Apr 21 06:21:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF84B16197; Thu, 21 Apr 2016 06:21:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7C51137; Thu, 21 Apr 2016 06:21:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3L6LXjg056143; Thu, 21 Apr 2016 06:21:33 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3L6LXT5056142; Thu, 21 Apr 2016 06:21:33 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201604210621.u3L6LXT5056142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 21 Apr 2016 06:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298393 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2016 06:21:34 -0000 Author: araujo Date: Thu Apr 21 06:21:33 2016 New Revision: 298393 URL: https://svnweb.freebsd.org/changeset/base/298393 Log: Use MAX() from sys/param.h. MFC after: 2 weeks. Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Thu Apr 21 06:19:33 2016 (r298392) +++ head/sbin/hastd/hastd.c Thu Apr 21 06:21:33 2016 (r298393) @@ -1090,7 +1090,7 @@ main_loop(void) fd = proto_descriptor(lst->hl_conn); PJDLOG_ASSERT(fd >= 0); FD_SET(fd, &rfds); - maxfd = fd > maxfd ? fd : maxfd; + maxfd = MAX(fd, maxfd); } TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { if (res->hr_event == NULL) @@ -1098,14 +1098,14 @@ main_loop(void) fd = proto_descriptor(res->hr_event); PJDLOG_ASSERT(fd >= 0); FD_SET(fd, &rfds); - maxfd = fd > maxfd ? fd : maxfd; + maxfd = MAX(fd, maxfd); if (res->hr_role == HAST_ROLE_PRIMARY) { /* Only primary workers asks for connections. */ PJDLOG_ASSERT(res->hr_conn != NULL); fd = proto_descriptor(res->hr_conn); PJDLOG_ASSERT(fd >= 0); FD_SET(fd, &rfds); - maxfd = fd > maxfd ? fd : maxfd; + maxfd = MAX(fd, maxfd); } else { PJDLOG_ASSERT(res->hr_conn == NULL); }