Compare commits
1 Commits
master
...
fix_path_c
Author | SHA1 | Date | |
---|---|---|---|
c2dd35633b |
@ -18,10 +18,11 @@
|
|||||||
char *default_path(const char *biphome, const char *filename, const char *desc)
|
char *default_path(const char *biphome, const char *filename, const char *desc)
|
||||||
{
|
{
|
||||||
char *conf_file;
|
char *conf_file;
|
||||||
// '/' and NULL
|
// '/' and \0
|
||||||
conf_file = bip_malloc(strlen(biphome) + strlen(filename) + 2);
|
conf_file = bip_malloc(strlen(biphome) + strlen(filename) + 2);
|
||||||
strcpy(conf_file, biphome);
|
strcpy(conf_file, biphome);
|
||||||
conf_file[strlen(biphome)] = '/';
|
conf_file[strlen(biphome)] = '/';
|
||||||
|
conf_file[strlen(biphome) + 1] = '\0';
|
||||||
strcat(conf_file, filename);
|
strcat(conf_file, filename);
|
||||||
mylog(LOG_INFO, "Using default %s: %s", desc, conf_file);
|
mylog(LOG_INFO, "Using default %s: %s", desc, conf_file);
|
||||||
return conf_file;
|
return conf_file;
|
||||||
|
Loading…
Reference in New Issue
Block a user