Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add additional env variable dump during init
[ric-plt/lib/rmr.git]
/
src
/
rmr
/
common
/
src
/
wrapper.c
diff --git
a/src/rmr/common/src/wrapper.c
b/src/rmr/common/src/wrapper.c
index
55cfe9e
..
9d3dd72
100644
(file)
--- a/
src/rmr/common/src/wrapper.c
+++ b/
src/rmr/common/src/wrapper.c
@@
-32,7
+32,7
@@
#include "../include/rmr.h"
#include "../include/rmr.h"
-#define ADD_SEP 1
+#define ADD_SEP
1
#define NO_SEP 0
/*
#define NO_SEP 0
/*
@@
-74,7
+74,7
@@
static int bang_on( char* target, char* src, int max ) {
if( src && target ) {
len = strlen( src );
if( (rc = len <= max ? len : 0 ) > 0 ) { // if it fits, add it.
if( src && target ) {
len = strlen( src );
if( (rc = len <= max ? len : 0 ) > 0 ) { // if it fits, add it.
- str
cat( target, src
);
+ str
ncat( target, src, len
);
}
}
}
}
@@
-155,6
+155,6
@@
extern char* rmr_get_consts( ) {
phrase = build_ival( "RMR_ERR_INITFAILED", RMR_ERR_INITFAILED, NO_SEP );
remain -= bang_on( wbuf, phrase, remain );
phrase = build_ival( "RMR_ERR_INITFAILED", RMR_ERR_INITFAILED, NO_SEP );
remain -= bang_on( wbuf, phrase, remain );
- str
cat( wbuf, " }"
);
+ str
ncat( wbuf, " }", remain
);
return strdup( wbuf ); // chop unused space and return
}
return strdup( wbuf ); // chop unused space and return
}