--- libaitsess/inc/defs.h 2011/04/30 22:02:59 1.2.2.1 +++ libaitsess/inc/defs.h 2011/08/21 14:00:43 1.2.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.2.2.1 2011/04/30 22:02:59 misho Exp $ +* $Id: defs.h,v 1.2.2.2 2011/08/21 14:00:43 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -46,15 +46,14 @@ SUCH DAMAGE. #ifndef __DEFS_H #define __DEFS_H -#define MAX_STR 255 +#define STRSIZ 256 #define MEM_MODE 0640 #define MEM_DELIM ":" #define LOGERR { \ - sessErrno = errno; \ - bzero(sessError, MAX_STR + 1); \ - strncpy(sessError, strerror(errno), MAX_STR); \ + sess_Errno = errno; \ + strlcpy(sess_Error, strerror(errno), sizeof sess_Error); \ } /* @@ -73,8 +72,8 @@ union semun { #endif -extern int sessErrno; -extern char sessError[]; +extern int sess_Errno; +extern char sess_Error[STRSIZ]; #endif