PengZheng commented on code in PR #470:
URL: https://github.com/apache/celix/pull/470#discussion_r1398331655
##########
libs/utils/src/properties.c:
##########
@@ -117,69 +409,62 @@ static void parseLine(const char* line,
celix_properties_t *props) {
output = NULL;
outputPos = 0;
- //Ignore empty lines
+ // Ignore empty lines
if (line[0] == '\n' && line[1] == '\0') {
return;
}
- char *key = calloc(1, key_len);
- char *value = calloc(1, value_len);
+ char* key = calloc(1, key_len);
+ char* value = calloc(1, value_len);
key[0] = '\0';
value[0] = '\0';
while (line[linePos] != '\0') {
if (line[linePos] == ' ' || line[linePos] == '\t') {
if (output == NULL) {
- //ignore
+ // ignore
linePos += 1;
continue;
}
- }
- else {
+ } else {
if (output == NULL) {
output = key;
}
}
if (line[linePos] == '=' || line[linePos] == ':' || line[linePos] ==
'#' || line[linePos] == '!') {
if (precedingCharIsBackslash) {
- //escaped special character
+ // escaped special character
output[outputPos++] = line[linePos];
updateBuffers(&key, &value, &output, outputPos, &key_len,
&value_len);
Review Comment:
It can be delayed until we solve #685.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]