extattr.c (8719c58fefefd5ceebb076be7e40b2a2be317c36) | extattr.c (92369d84a93b9b49049dc1b9b50a731a836ad415) |
---|---|
1/*- 2 * Copyright (c) 2001 Robert N. M. Watson 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 --- 29 unchanged lines hidden (view full) --- 38#include <string.h> 39 40int 41extattr_namespace_to_string(int attrnamespace, char **string) 42{ 43 44 switch(attrnamespace) { 45 case EXTATTR_NAMESPACE_USER: | 1/*- 2 * Copyright (c) 2001 Robert N. M. Watson 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 --- 29 unchanged lines hidden (view full) --- 38#include <string.h> 39 40int 41extattr_namespace_to_string(int attrnamespace, char **string) 42{ 43 44 switch(attrnamespace) { 45 case EXTATTR_NAMESPACE_USER: |
46 if (*string != NULL) | 46 if (string != NULL) |
47 *string = strdup(EXTATTR_NAMESPACE_USER_STRING); 48 return (0); 49 50 case EXTATTR_NAMESPACE_SYSTEM: | 47 *string = strdup(EXTATTR_NAMESPACE_USER_STRING); 48 return (0); 49 50 case EXTATTR_NAMESPACE_SYSTEM: |
51 if (*string != NULL) | 51 if (string != NULL) |
52 *string = strdup(EXTATTR_NAMESPACE_SYSTEM_STRING); 53 return (0); 54 55 default: 56 errno = EINVAL; 57 return (-1); 58 } 59} --- 18 unchanged lines hidden --- | 52 *string = strdup(EXTATTR_NAMESPACE_SYSTEM_STRING); 53 return (0); 54 55 default: 56 errno = EINVAL; 57 return (-1); 58 } 59} --- 18 unchanged lines hidden --- |