/srv/hg/libpwquality: Allow no space around '=' in config file.
by admin@fedoraproject.org
changeset 788d3c7fa06a in /srv/hg/libpwquality
details: http://hg.fedorahosted.org/hg/srv/hg/libpwquality?cmd=changeset;node=788d...
summary: Allow no space around '=' in config file.
diffstat:
src/settings.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r 874d0881c833 -r 788d3c7fa06a src/settings.c
--- a/src/settings.c Wed Feb 18 16:13:34 2015 +0100
+++ b/src/settings.c Wed Apr 08 10:45:53 2015 +0200
@@ -150,9 +150,11 @@
if (*ptr == '\0')
continue;
+ eq = 0;
name = ptr;
while (*ptr != '\0') {
- if (isspace(*ptr)) {
+ if (isspace(*ptr) || *ptr == '=') {
+ eq = *ptr == '=';
*ptr = '\0';
++ptr;
break;
@@ -160,7 +162,6 @@
++ptr;
}
- eq = 0;
while (*ptr != '\0') {
if (*ptr != '=' || eq) {
if (!isspace(*ptr)) {
9 years, 1 month