函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\label.c Create Date:2022-07-27 21:43:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:assumes vec is sorted* Assumes @vec has null terminator at vec[n], and will null terminate* vec[n - dups]

函数原型:static inline int unique(struct aa_profile **vec, int n)

返回类型:int

参数:

类型参数名称
struct aa_profile **vec
intn
226  dups等于0
228  AA_BUG(n < 1)
229  AA_BUG(!vec)
231  pos等于0
232 i小于n循环
233  res等于profile_cmp - profile comparison for set ordering*@a: profile to compare (NOT NULL)*@b: profile to compare (NOT NULL)* Returns: <0 if a < b* ==0 if a == b* >0 if a > b
235  AA_BUG(res > 0, "vec not sorted")
236  如果res恒等于0则
239  dups自加
240  继续下一循环
242  pos自加
243  如果dupsvec[pos]等于vec[i]
247  AA_BUG(dups < 0)
249  返回:dups
调用者
名称描述
aa_vec_uniqueaa_vec_unique - canonical sort and unique a list of profiles*@n: number of refcounted profiles in the list (@n > 0)*@vec: list of profiles to sort and merge* Returns: the number of duplicates eliminated == references put* If @flags & VEC_FLAG_TERMINATE