| 2140 | */ |
| 2141 | |
| 2142 | ipp_t * /* O - Collection value or @code NULL@ on error */ |
| 2143 | ippGetCollection( |
| 2144 | ipp_attribute_t *attr, /* I - IPP attribute */ |
| 2145 | int element) /* I - Value number (0-based) */ |
| 2146 | { |
| 2147 | /* |
| 2148 | * Range check input... |
| 2149 | */ |
| 2150 | |
| 2151 | if (!attr || attr->value_tag != IPP_TAG_BEGIN_COLLECTION || |
| 2152 | element < 0 || element >= attr->num_values) |
| 2153 | return (NULL); |
| 2154 | |
| 2155 | /* |
| 2156 | * Return the value... |
| 2157 | */ |
| 2158 | |
| 2159 | return (attr->values[element].collection); |
| 2160 | } |
| 2161 | |
| 2162 | |
| 2163 | /* |
no outgoing calls
no test coverage detected