celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [5/5] celix git commit: CELIX-355: Added correctly handling for empty lines in properties files
Date Wed, 20 Apr 2016 16:31:13 GMT
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 <pepijnnoltes@gmail.com>
Authored: Wed Apr 20 18:30:52 2016 +0200
Committer: Pepijn Noltes <pepijnnoltes@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) {


Mime
View raw message