svn commit: r282248 - in head/sys: kern sys
Mariusz Zaborski
oshogbo at FreeBSD.org
Wed Apr 29 21:50:05 UTC 2015
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)
More information about the svn-src-all
mailing list