}
} else {
if( buf[len-1] != '\n' ) {
- fprintf( stderr, "[WARN] rmr buf_check: input buffer was not newline terminated (file missing final \\n?)\n" );
+ fprintf( stderr, "[WRN] rmr buf_check: input buffer was not newline terminated (file missing final \\n?)\n" );
if( (nb = (char *) malloc( sizeof( char ) * (len + 2) )) != NULL ) {
memcpy( nb, buf, len );
*(nb+len) = '\n'; // insert \n and nil into the two extra bytes we allocated
*(nb+len+1) = 0;
- free( buf );
}
+
+ free( buf );
}
}
}
if( (rte = (rtable_ent_t *) malloc( sizeof( *rte ) )) == NULL ) {
- fprintf( stderr, "rmr_add_rte: malloc failed for entry\n" );
+ fprintf( stderr, "[ERR] rmr_add_rte: malloc failed for entry\n" );
return NULL;
}
memset( rte, 0, sizeof( *rte ) );
rmr_sym_map( rt->hash, key, rte ); // add to hash using numeric mtype as key
- if( DEBUG ) fprintf( stderr, "[DBUG] route table entry created: k=%lx groups=%d\n", key, nrrgroups );
+ if( DEBUG ) fprintf( stderr, "[DBUG] route table entry created: k=%llx groups=%d\n", (long long) key, nrrgroups );
return rte;
}
if( (eor = strchr( rec, '\n' )) != NULL ) {
*eor = 0;
} else {
- fprintf( stderr, "[WARN] rmr read_static: seed route table had malformed records (missing newline): %s\n", fname );
- fprintf( stderr, "[WARN] rmr read_static: seed route table not used: %s\n", fname );
+ fprintf( stderr, "[WRN] rmr read_static: seed route table had malformed records (missing newline): %s\n", fname );
+ fprintf( stderr, "[WRN] rmr read_static: seed route table not used: %s\n", fname );
free( fbuf );
return;
}
endpoint_t* ep;
if( !rt || !ep_name || ! *ep_name ) {
- fprintf( stderr, "[WARN] rmr: rt_ensure: internal mishap, something undefined rt=%p ep_name=%p\n", rt, ep_name );
+ fprintf( stderr, "[WRN] rmr: rt_ensure: internal mishap, something undefined rt=%p ep_name=%p\n", rt, ep_name );
errno = EINVAL;
return NULL;
}
if( (ep = uta_get_ep( rt, ep_name )) == NULL ) { // not there yet, make
if( (ep = (endpoint_t *) malloc( sizeof( *ep ) )) == NULL ) {
- fprintf( stderr, "[WARN] rmr: rt_ensure: malloc failed for endpoint creation: %s\n", ep_name );
+ fprintf( stderr, "[WRN] rmr: rt_ensure: malloc failed for endpoint creation: %s\n", ep_name );
errno = ENOMEM;
return NULL;
}