You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2016/04/20 18:31:13 UTC
[5/5] celix git commit: CELIX-355: Added correctly handling for empty
lines in properties files
CELIX-355: Added correctly handling for empty lines in properties files
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/9653f068
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/9653f068
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/9653f068
Branch: refs/heads/develop
Commit: 9653f068363d13d891936f0da3e9dd8cc0bbb5d2
Parents: 777b831
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Apr 20 18:30:52 2016 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Apr 20 18:30:52 2016 +0200
----------------------------------------------------------------------
framework/private/src/properties.c | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/9653f068/framework/private/src/properties.c
----------------------------------------------------------------------
diff --git a/framework/private/src/properties.c b/framework/private/src/properties.c
index 5f1b67e..742e563 100644
--- a/framework/private/src/properties.c
+++ b/framework/private/src/properties.c
@@ -76,6 +76,11 @@ FRAMEWORK_EXPORT properties_pt properties_loadWithStream(FILE *file) {
key[0] = '\0';
value[0] = '\0';
+ //Ignore empty lines
+ if(line[0]=='\n' && line[1]=='\0'){
+ continue;
+ }
+
while (line[linePos] != '\0') {
if (line[linePos] == ' ' || line[linePos] == '\t') {
if (output == NULL) {