fix misplaced parens in sizeof exprs; from Simon Burge in PR bin/3427.

This commit is contained in:
mikel 1997-04-03 06:14:37 +00:00
parent 53704bc733
commit 9d6bac5230
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: crontab.c,v 1.4 1997/03/13 06:19:14 mikel Exp $ */
/* $NetBSD: crontab.c,v 1.5 1997/04/03 06:14:38 mikel Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@ -19,7 +19,7 @@
#if !defined(lint) && !defined(LINT)
/*static char rcsid[] = "Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp";*/
static char rcsid[] = "$NetBSD: crontab.c,v 1.4 1997/03/13 06:19:14 mikel Exp $";
static char rcsid[] = "$NetBSD: crontab.c,v 1.5 1997/04/03 06:14:38 mikel Exp $";
#endif
/* crontab - install and manage per-user crontab files
@ -171,7 +171,7 @@ parse_args(argc, argv)
ProgramName, optarg);
exit(ERROR_EXIT);
}
(void) strncpy(User, optarg, sizeof(User - 1));
(void) strncpy(User, optarg, sizeof(User) - 1);
User[sizeof(User) - 1] = '\0';
break;
case 'l':

View File

@ -1,4 +1,4 @@
/* $NetBSD: env.c,v 1.4 1997/03/13 06:19:17 mikel Exp $ */
/* $NetBSD: env.c,v 1.5 1997/04/03 06:14:37 mikel Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@ -19,7 +19,7 @@
#if !defined(lint) && !defined(LINT)
/*static char rcsid[] = "Id: env.c,v 2.7 1994/01/26 02:25:50 vixie Exp";*/
static char rcsid[] = "$NetBSD: env.c,v 1.4 1997/03/13 06:19:17 mikel Exp $";
static char rcsid[] = "$NetBSD: env.c,v 1.5 1997/04/03 06:14:37 mikel Exp $";
#endif
@ -152,7 +152,7 @@ load_env(envstr, f)
if (val[len-1] == val[0]) {
val[len-1] = '\0';
(void) strncpy(val, val+1,
sizeof(val - 1));
sizeof(val) - 1);
val[sizeof(val) - 1] = '\0';
}
}