summaryrefslogtreecommitdiff
path: root/modules/pam_pwhistory
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-03-17 21:29:24 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-03-19 18:40:16 +0000
commit8d5fe1790a01969545e6cc1872ac629490692ac2 (patch)
tree86447af4a5fc74eed362444dbe631bcdc9018d9d /modules/pam_pwhistory
parent13ec29f9c11e9ee73fc0f62dd56b3dffc7742c39 (diff)
Introduce pam_str_skip_icase_prefix_len and pam_str_skip_icase_prefix
Every time I see a code like if (strncasecmp(argv, "remember=", 9) == 0) options->remember = strtol(&argv[9], NULL, 10); my eyes are bleeding. Similar to pam_str_skip_prefix_len() and pam_str_skip_prefix(), introduce a new helper inline function pam_str_skip_icase_prefix_len() and a new macro pam_str_skip_icase_prefix() on top of it, to be used in subsequent commits to cleanup the ugliness. * libpam/include/pam_inline.h (pam_str_skip_icase_prefix_len): New function. (pam_str_skip_icase_prefix): New macro.
Diffstat (limited to 'modules/pam_pwhistory')
0 files changed, 0 insertions, 0 deletions