char *progname;
void install_signal_handler();
SVCXPRT *transp;
- struct sockaddr_in saddr;
+ struct sockaddr_in saddr;
#if defined(DEC) || defined(HPUX)
- int asize = sizeof(struct sockaddr);
+ int asize = sizeof(saddr);
#else
# if defined(linux) || defined(CSRG_BASED) || defined(sun)
- socklen_t asize;
+ socklen_t asize = sizeof(saddr);
# else
- size_t asize = sizeof(struct sockaddr);
+ size_t asize = sizeof(saddr);
# endif
#endif
int is_aix = 0;
struct t_info info;
#endif
- memset((char *)&saddr,0,sizeof(struct sockaddr));
+ memset(&saddr, 0, sizeof(saddr));
#if defined(OPT_TLI)
memset((char *)&info,0,sizeof info);
{
_Tt_pattern_ptr pat = _tt_htab->lookup_pat(p);
_Tt_pat_context_ptr cntxt;
- Tt_status status;
+ Tt_status status = TT_OK;
int add = 0;
cntxt = pat->context(slotname);
add = 1;
}
// NULL value means leave value unset (which matches everything)
- if (value != (char *)0) {
+ if (value != NULL) {
_Tt_string valString(value);
status = cntxt->addValue(valString);
if (status != TT_OK) {
{
_Tt_pattern_ptr pat = _tt_htab->lookup_pat(p);
_Tt_pat_context_ptr cntxt;
- Tt_status status;
+ Tt_status status = TT_OK;
int add = 0;
add = 1;
}
// NULL value means leave value unset (which matches everything)
- if (value != (unsigned char *)0) {
+ if (value != NULL) {
_Tt_string valString( value, len );
status = cntxt->addValue( valString );
#else
int len;
#endif
- int optval;
+ int optval = 1;
+
_sock = socket(AF_INET, SOCK_STREAM, 0);
if (_sock < 0) {
_tt_syslog( 0, LOG_ERR,
_is_source = init_as_source;
if (init_as_source) { /* 'from' end of socket */
#if !defined(OPT_TLI)
- optval = 1;
#ifndef linux
if (setsockopt(_sock, SOL_SOCKET, SO_USELOOPBACK,
(char *)&optval, sizeof(int)) == -1) {
{
Fcb *fcb = NULL;
Bytearray *isfhandle2;
- Bytearray isfhandle0;
+ Bytearray isfhandle0 = _bytearr_getempty();
Keydesc2 keydesc2;
int err;
Crp *crp;
char isfname2[MAXPATHLEN];
int isfd = -1, isfd2 = -1;
char buffer[ISMAXRECLEN];
- char *recbuf;
+ char *recbuf = NULL;
struct dictinfo info;
struct keydesc keybuf;
struct stat statbuf;
(void)isclose(isfd2);
(void)iserase(isfname2);
}
- if (recbuf != buffer) free(recbuf);
+ if ((recbuf != buffer) && (recbuf != NULL)) {
+ free(recbuf);
+ }
return (ISERROR);
}