* grub-core/fs/zfs/zfs.c: Stylistic fixes.
This commit is contained in:
parent
1bd57aa343
commit
286fe4b379
2 changed files with 33 additions and 22 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-07-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/zfs/zfs.c: Stylistic fixes.
|
||||
|
||||
2013-07-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/zfs/zfs.c: Run emacs indent on file.
|
||||
|
|
|
@ -820,10 +820,13 @@ nvlist_next_nvpair(const char *nvl, const char *nvpair)
|
|||
if (nvl == NULL)
|
||||
return NULL;
|
||||
|
||||
if (nvpair == NULL) {
|
||||
if (nvpair == NULL)
|
||||
{
|
||||
/* skip over header, nvl_version and nvl_nvflag */
|
||||
nvpair = nvl + 4 * 3;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/* skip to the next nvpair */
|
||||
encode_size = grub_be_to_cpu32 (grub_get_unaligned32(nvpair));
|
||||
nvpair += encode_size;
|
||||
|
@ -832,7 +835,8 @@ nvlist_next_nvpair(const char *nvl, const char *nvpair)
|
|||
* If encode_size is less than 0, this will move the pointer
|
||||
* backwards, *possibly* examinining two times the same nvpair
|
||||
* and potentially getting into an infinite loop. */
|
||||
if(encode_size <= 0) {
|
||||
if(encode_size <= 0)
|
||||
{
|
||||
grub_dprintf ("zfs", "nvpair with size <= 0\n");
|
||||
grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist");
|
||||
return NULL;
|
||||
|
@ -867,6 +871,7 @@ nvlist_next_nvpair(const char *nvl, const char *nvpair)
|
|||
|
||||
return nvpair;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function returns 0 on success and 1 on failure. On success, a string
|
||||
* containing the name of nvpair is saved in buf.
|
||||
|
@ -887,6 +892,7 @@ nvpair_name(const char *nvp, char **buf, int* buflen)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function retrieves the value of the nvpair in the form of enumerated
|
||||
* type data_type_t.
|
||||
|
@ -910,6 +916,7 @@ nvpair_type(const char *nvp)
|
|||
|
||||
return type;
|
||||
}
|
||||
|
||||
static int
|
||||
nvpair_value (const char *nvp,char **val,
|
||||
grub_size_t *size_out, grub_size_t *nelm_out)
|
||||
|
|
Loading…
Reference in a new issue