diff --git a/runtime/include/util.h b/runtime/include/util.h index 3776819..41f69f8 100644 --- a/runtime/include/util.h +++ b/runtime/include/util.h @@ -5,6 +5,6 @@ #include /* perhaps move it to module.h or sandbox.h? */ -int util_parse_modules_file_json(char *filename); +int util__parse_modules_file_json(char *filename); #endif /* SFRT_UTIL_H */ diff --git a/runtime/src/main.c b/runtime/src/main.c index 4e5b5ee..f4f3a5e 100644 --- a/runtime/src/main.c +++ b/runtime/src/main.c @@ -171,7 +171,7 @@ main(int argc, char **argv) initialize_runtime(); debuglog("Parsing modules file [%s]\n", argv[1]); - if (util_parse_modules_file_json(argv[1])) { + if (util__parse_modules_file_json(argv[1])) { printf("failed to parse modules file[%s]\n", argv[1]); exit(-1); } diff --git a/runtime/src/util.c b/runtime/src/util.c index 77704f7..0dc1b0b 100644 --- a/runtime/src/util.c +++ b/runtime/src/util.c @@ -11,30 +11,13 @@ #define UTIL_MOD_LINE_MAX 1024 -/** - * Removes leading and trailing spaces from a string - * @param str source string - * @return string without leading or training spaces - **/ -static char * -util_remove_spaces(char *str) -{ - int i = 0; - while (isspace(*str)) str++; - i = strlen(str); - while (isspace(str[i - 1])) str[i - 1] = '\0'; - - return str; -} - - /** * Parses a JSON file and allocates one or more new modules * @param file_name The path of the JSON file * @return RC 0 on Success. -1 on Error */ int -util_parse_modules_file_json(char *file_name) +util__parse_modules_file_json(char *file_name) { // Use stat to get file attributes and make sure file is there and OK struct stat stat_buffer;