Garbage collect cc in moduser, it is only set once, but never read as

noticed by lint.
This commit is contained in:
joerg 2006-03-22 18:02:46 +00:00
parent 5dc48904d3
commit 368cb1b951

View File

@ -1,4 +1,4 @@
/* $NetBSD: user.c,v 1.107 2006/03/22 18:01:11 joerg Exp $ */ /* $NetBSD: user.c,v 1.108 2006/03/22 18:02:46 joerg Exp $ */
/* /*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved. * Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@ -33,7 +33,7 @@
#ifndef lint #ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999 \ __COPYRIGHT("@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved."); The NetBSD Foundation, Inc. All rights reserved.");
__RCSID("$NetBSD: user.c,v 1.107 2006/03/22 18:01:11 joerg Exp $"); __RCSID("$NetBSD: user.c,v 1.108 2006/03/22 18:02:46 joerg Exp $");
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@ -1377,7 +1377,6 @@ moduser(char *login_name, char *newlogin, user_t *up, int allow_samba)
size_t colonc; size_t colonc;
size_t loginc; size_t loginc;
size_t len; size_t len;
size_t cc;
FILE *master; FILE *master;
char newdir[MaxFileNameLen]; char newdir[MaxFileNameLen];
char buf[MaxEntryLen]; char buf[MaxEntryLen];
@ -1637,7 +1636,7 @@ moduser(char *login_name, char *newlogin, user_t *up, int allow_samba)
} }
} else { } else {
len = strlen(buf); len = strlen(buf);
if ((cc = write(ptmpfd, buf, len)) != len) { if (write(ptmpfd, buf, len) != len) {
int serrno = errno; int serrno = errno;
(void)close(masterfd); (void)close(masterfd);
(void)close(ptmpfd); (void)close(ptmpfd);