acl_support_nfs4.c (287445) | acl_support_nfs4.c (297790) |
---|---|
1/*- 2 * Copyright (c) 2008, 2009 Edward Tomasz Napiera��a <trasz@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008, 2009 Edward Tomasz Napiera��a <trasz@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_support_nfs4.c 287445 2015-09-04 00:14:20Z delphij $"); | 28__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_support_nfs4.c 297790 2016-04-10 19:33:58Z pfg $"); |
29 30#include <stdio.h> 31#include <stdlib.h> 32#include <string.h> 33#include <assert.h> 34#include <err.h> 35#include <sys/acl.h> 36#include "acl_support.h" --- 39 unchanged lines hidden (view full) --- 76 { ACL_READ_SET, "read_set", '\0'}, 77 { ACL_WRITE_SET, "write_set", '\0'}, 78 { 0, 0, 0}}; 79 80static const char * 81format_flag(uint32_t *var, const struct flagnames_struct *flags) 82{ 83 | 29 30#include <stdio.h> 31#include <stdlib.h> 32#include <string.h> 33#include <assert.h> 34#include <err.h> 35#include <sys/acl.h> 36#include "acl_support.h" --- 39 unchanged lines hidden (view full) --- 76 { ACL_READ_SET, "read_set", '\0'}, 77 { ACL_WRITE_SET, "write_set", '\0'}, 78 { 0, 0, 0}}; 79 80static const char * 81format_flag(uint32_t *var, const struct flagnames_struct *flags) 82{ 83 |
84 for (; flags->name != 0; flags++) { | 84 for (; flags->name != NULL; flags++) { |
85 if ((flags->flag & *var) == 0) 86 continue; 87 88 *var &= ~flags->flag; 89 return (flags->name); 90 } 91 92 return (NULL); --- 169 unchanged lines hidden --- | 85 if ((flags->flag & *var) == 0) 86 continue; 87 88 *var &= ~flags->flag; 89 return (flags->name); 90 } 91 92 return (NULL); --- 169 unchanged lines hidden --- |