/*
- * $Id: config.c,v 1.17 2009-10-13 22:55:37 didg Exp $
+ * $Id: config.c,v 1.20 2009-10-29 11:35:58 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#define ARGV_CHUNK_SIZE 128
#define MAXLINELEN 2048
-char **parseline(const char *line)
+static char **parseline(const char *line)
{
const char *p;
int argc = 0;
return argv;
}
-void freeline( char **argv )
+static void freeline( char **argv )
{
char **tmp = argv;
return -1;
}
- if (( stop = strchr( nrange, '-' )) != 0 ) {
+ if (( stop = strchr( nrange, '-' )) != NULL ) {
stop++;
}
net = atoi( nrange );
}
if ( iface->i_flags & IFACE_PHASE1 ) {
- if ( stop != 0 ) {
+ if ( stop != NULL ) {
fprintf( stderr, "Phase 1 doesn't use an address range.\n" );
return -1;
}
iface->i_rt->rt_firstnet = iface->i_rt->rt_lastnet = htons( net );
} else if ( iface->i_flags & IFACE_PHASE2 ) {
iface->i_rt->rt_firstnet = htons( net );
- if ( stop != 0 ) {
+ if ( stop != NULL ) {
net = atoi( stop );
if ( net < 0 || net >= 0xffff ) {
fprintf( stderr, "Bad network: %d\n", net );
}
/* codepage conversion */
- if ((size_t)(-1) == convert_string_allocate(CH_UNIX, CH_MAC, av[0], strlen(av[0]), &zname)) {
+ if ((size_t)(-1) == convert_string_allocate(CH_UNIX, CH_MAC, av[0], -1, &zname)) {
zname = strdup(av[0]);
}
}
LOG(log_info, logtype_atalkd, "plumbed %s%d", device, ppa );
+
+ close(fd);
}
return( 0 );