Page MenuHomeFreeBSD

D58490.diff
No OneTemporary

D58490.diff

diff --git a/contrib/libucl/src/ucl_util.c b/contrib/libucl/src/ucl_util.c
--- a/contrib/libucl/src/ucl_util.c
+++ b/contrib/libucl/src/ucl_util.c
@@ -1088,7 +1088,7 @@
bool res;
struct ucl_chunk *chunk;
unsigned char *buf = NULL;
- char *old_curfile, *ext;
+ char *old_curfile, *ext, *tmp;
size_t buflen = 0;
char filebuf[PATH_MAX], realbuf[PATH_MAX];
int prev_state;
@@ -1200,12 +1200,13 @@
if (params->use_prefix && params->prefix == NULL) {
/* Auto generate a key name based on the included filename */
- params->prefix = basename(realbuf);
- ext = strrchr(params->prefix, '.');
+ tmp = basename(realbuf);
+ ext = strrchr(tmp, '.');
if (ext != NULL && (strcmp(ext, ".conf") == 0 || strcmp(ext, ".ucl") == 0)) {
/* Strip off .conf or .ucl */
*ext = '\0';
}
+ params->prefix = tmp;
}
if (params->prefix != NULL) {
/* This is a prefixed include */

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 8, 4:09 AM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35675427
Default Alt Text
D58490.diff (895 B)

Event Timeline