From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 21:50:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6484AE35; Wed, 29 Apr 2015 21:50:05 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B321BFA; Wed, 29 Apr 2015 21:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TLo51Z056378; Wed, 29 Apr 2015 21:50:05 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TLo4nU056375; Wed, 29 Apr 2015 21:50:04 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292150.t3TLo4nU056375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 21:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282248 - in head/sys: kern sys 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.20 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: Wed, 29 Apr 2015 21:50:05 -0000 Author: oshogbo Date: Wed Apr 29 21:50:04 2015 New Revision: 282248 URL: https://svnweb.freebsd.org/changeset/base/282248 Log: Style fixes. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c head/sys/sys/nv_impl.h Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 20:30:11 2015 (r282247) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 21:50:04 2015 (r282248) @@ -1260,8 +1260,9 @@ nvlist_add_stringv(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1376,8 +1377,9 @@ nvlist_addv_null(nvlist_t *nvl, const ch if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1394,8 +1396,9 @@ nvlist_addv_bool(nvlist_t *nvl, bool val if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1413,8 +1416,9 @@ nvlist_addv_number(nvlist_t *nvl, uint64 if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1432,8 +1436,9 @@ nvlist_addv_string(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1451,8 +1456,9 @@ nvlist_addv_nvlist(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } #ifndef _KERNEL @@ -1490,8 +1496,9 @@ nvlist_addv_binary(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1586,8 +1593,9 @@ nvlist_movev_string(nvlist_t *nvl, char if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1607,8 +1615,9 @@ nvlist_movev_nvlist(nvlist_t *nvl, nvlis if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } #ifndef _KERNEL @@ -1648,8 +1657,9 @@ nvlist_movev_binary(nvlist_t *nvl, void if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } const nvpair_t * Modified: head/sys/sys/nv_impl.h ============================================================================== --- head/sys/sys/nv_impl.h Wed Apr 29 20:30:11 2015 (r282247) +++ head/sys/sys/nv_impl.h Wed Apr 29 21:50:04 2015 (r282248) @@ -41,8 +41,8 @@ typedef struct nvpair nvpair_t; #define NV_TYPE_NVLIST_UP 255 -#define NV_TYPE_FIRST NV_TYPE_NULL -#define NV_TYPE_LAST NV_TYPE_BINARY +#define NV_TYPE_FIRST NV_TYPE_NULL +#define NV_TYPE_LAST NV_TYPE_BINARY #define NV_FLAG_BIG_ENDIAN 0x80 @@ -70,8 +70,8 @@ typedef struct nvpair nvpair_t; #define nv_strdup(buf) strdup((buf)) #define nv_vasprintf(ptr, ...) vasprintf(ptr, __VA_ARGS__) -#define SAVE_ERRNO(var) (var) = errno -#define RESTORE_ERRNO(var) errno = (var) +#define SAVE_ERRNO(var) (var) = errno +#define RESTORE_ERRNO(var) errno = (var) #define ERRNO_OR_DEFAULT(default) (errno == 0 ? (default) : errno)