projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Update SPV file format documentation.
[pspp]
/
src
/
language
/
utilities
/
permissions.c
diff --git
a/src/language/utilities/permissions.c
b/src/language/utilities/permissions.c
index 904ba95b270e2a7de6c5a22e729f64b8b3247cf1..e1516450371780a94dee8309b1fbe49ca531168c 100644
(file)
--- a/
src/language/utilities/permissions.c
+++ b/
src/language/utilities/permissions.c
@@
-51,9
+51,10
@@
cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED)
lex_match (lexer, T_EQUALS);
str = lex_tokcstr (lexer);
lex_match (lexer, T_EQUALS);
str = lex_tokcstr (lexer);
- fn = strdup (str);
+ if (str)
+ fn = strdup (str);
- if (!lex_force_match (lexer, T_STRING))
+ if (!lex_force_match (lexer, T_STRING)
|| str == NULL
)
goto error;
lex_match (lexer, T_SLASH);
goto error;
lex_match (lexer, T_SLASH);
@@
-75,7
+76,7
@@
cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED)
}
else
{
}
else
{
- lex_error_expecting (lexer, "WRITEABLE", "READONLY"
, NULL_SENTINEL
);
+ lex_error_expecting (lexer, "WRITEABLE", "READONLY");
goto error;
}
goto error;
}