From owner-svn-src-stable@FreeBSD.ORG Tue Aug 20 14:25:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B10FF379; Tue, 20 Aug 2013 14:25:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E7302385; Tue, 20 Aug 2013 14:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KEPjX5053129; Tue, 20 Aug 2013 14:25:45 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KEPjaK053125; Tue, 20 Aug 2013 14:25:45 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308201425.r7KEPjaK053125@svn.freebsd.org> From: Ed Maste Date: Tue, 20 Aug 2013 14:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254567 - stable/9/lib/libusb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 14:25:45 -0000 Author: emaste Date: Tue Aug 20 14:25:44 2013 New Revision: 254567 URL: http://svnweb.freebsd.org/changeset/base/254567 Log: MFC r250335: Constify libusb_get_pollfds return The correct return type, per our libusb(3) man page and the libusb.org and libusbx projects (whose interface we intend to follow for our libusb), is const struct libusb_pollfd **. Modified: stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10_io.c Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Tue Aug 20 14:19:00 2013 (r254566) +++ stable/9/lib/libusb/libusb.h Tue Aug 20 14:25:44 2013 (r254567) @@ -438,7 +438,7 @@ int libusb_handle_events(libusb_context int libusb_handle_events_locked(libusb_context * ctx, struct timeval *tv); int libusb_get_next_timeout(libusb_context * ctx, struct timeval *tv); void libusb_set_pollfd_notifiers(libusb_context * ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data); -struct libusb_pollfd **libusb_get_pollfds(libusb_context * ctx); +const struct libusb_pollfd **libusb_get_pollfds(libusb_context * ctx); /* Synchronous device I/O */ Modified: stable/9/lib/libusb/libusb10_io.c ============================================================================== --- stable/9/lib/libusb/libusb10_io.c Tue Aug 20 14:19:00 2013 (r254566) +++ stable/9/lib/libusb/libusb10_io.c Tue Aug 20 14:25:44 2013 (r254567) @@ -392,7 +392,7 @@ libusb_set_pollfd_notifiers(libusb_conte ctx->fd_cb_user_data = user_data; } -struct libusb_pollfd ** +const struct libusb_pollfd ** libusb_get_pollfds(libusb_context *ctx) { struct libusb_super_pollfd *pollfd; @@ -418,7 +418,7 @@ libusb_get_pollfds(libusb_context *ctx) done: CTX_UNLOCK(ctx); - return (ret); + return ((const struct libusb_pollfd **)ret); }