From e2696cc497619e84644be35648732bb6083d695d Mon Sep 17 00:00:00 2001 From: gad Date: Fri, 12 Jul 2002 01:37:06 +0000 Subject: Fix set_qstate() so it correctly checks for any error from chmod(). Note that set_qstate() is only called from several 'lpc' commands. MFC after: 3 days --- usr.sbin/lpr/common_source/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/lpr') diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index c731f9b..ae84b63 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -349,7 +349,7 @@ set_qstate(int action, const char *lfname) errsav = errno; seteuid(uid); res = SQS_CHGOK; - if (res < 0) + if (chres < 0) res = SQS_CHGFAIL; } else if (newbits == LOCK_FILE_MODE) { /* -- cgit v1.1