]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zcommon/zfs_deleg.c
OpenZFS 6931 - lib/libzfs: cleanup gcc warnings
[mirror_zfs.git] / module / zcommon / zfs_deleg.c
index 647a24e5ff1f1c6070e5c1a96b2aad6bc0b90f87..ce659d7f5cc8ed506408100bc35e9627f86fe9b3 100644 (file)
@@ -22,6 +22,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
  */
 
 #include <sys/zfs_context.h>
@@ -181,8 +182,9 @@ zfs_deleg_verify_nvlist(nvlist_t *nvp)
                            nvpair_name(perm_name));
                        if (error)
                                return (-1);
-               } while ((perm_name = nvlist_next_nvpair(perms, perm_name)));
-       } while ((who = nvlist_next_nvpair(nvp, who)));
+               } while ((perm_name = nvlist_next_nvpair(perms, perm_name))
+                   != NULL);
+       } while ((who = nvlist_next_nvpair(nvp, who)) != NULL);
        return (0);
 }