From owner-cvs-lib Tue Apr 1 19:38:32 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02026 for cvs-lib-outgoing; Tue, 1 Apr 1997 19:38:32 -0800 (PST) Received: (from ache@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02019; Tue, 1 Apr 1997 19:38:31 -0800 (PST) Date: Tue, 1 Apr 1997 19:38:31 -0800 (PST) From: "Andrey A. Chernov" Message-Id: <199704020338.TAA02019@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/libutil uucplock.3 uucplock.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ache 97/04/01 19:38:30 Modified: lib/libutil uucplock.3 uucplock.c Log: Remove unused USE_PERROR define and syslog.h include Use snprintf instead of sprintf to avoid buffer overflows Use snprintf in uu_lockerr instead of lots of hardcoded constants and not null-terminated strncpy Return "" for OK and "device in use" for INUSE, it allows simple strcpy(buf, uu_lockerr(retcode)) without testing for special OK case (NULL was there) and obtaining meaningful result for INUSE ("" was there) without special testing for it too. Revision Changes Path 1.4 +3 -6 src/lib/libutil/uucplock.3 1.3 +14 -19 src/lib/libutil/uucplock.c