diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-03-16 21:02:18 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-03-19 18:40:16 +0000 |
commit | 584c53979874cd0caeb13d44d5477c81155fa285 (patch) | |
tree | 1f3f980c40a52858ead5d7e797327666162bf028 /modules/pam_access | |
parent | 1181e0590c9f059c40b71718d4fb3b6c339f65db (diff) | |
download | pam-584c53979874cd0caeb13d44d5477c81155fa285.tar.gz pam-584c53979874cd0caeb13d44d5477c81155fa285.tar.bz2 pam-584c53979874cd0caeb13d44d5477c81155fa285.zip |
Introduce pam_str_skip_prefix_len and pam_str_skip_prefix
Every time I see a code like
if (!strncmp(*argv,"user_readenv=",13))
*user_readenv = atoi(13+*argv);
my eyes are bleeding.
Introduce a new helper inline function pam_str_skip_prefix_len() and
a new macro pam_str_skip_prefix() on top of it, to be used in subsequent
commits to cleanup the ugliness.
* libpam/include/pam_inline.h: Include <string.h>.
(pam_str_skip_prefix_len): New function.
(pam_str_skip_prefix): New macro.
Diffstat (limited to 'modules/pam_access')
0 files changed, 0 insertions, 0 deletions