[misc.c]
     upcast uid to long with matching %ld, prevents warnings in portable
This commit is contained in:
Darren Tucker 2008-06-13 14:48:59 +10:00
parent 2c91b28a6d
commit 7517b5bd31
2 changed files with 6 additions and 3 deletions

View File

@ -154,6 +154,9 @@
- dtucker@cvs.openbsd.org 2008/06/13 00:51:47 - dtucker@cvs.openbsd.org 2008/06/13 00:51:47
[mac.c] [mac.c]
upcast another size_t to u_long to match format upcast another size_t to u_long to match format
- dtucker@cvs.openbsd.org 2008/06/13 01:38:23
[misc.c]
upcast uid to long with matching %ld, prevents warnings in portable
- (dtucker) [clientloop.c serverloop.c] channel_register_filter now - (dtucker) [clientloop.c serverloop.c] channel_register_filter now
takes 2 more args. with djm@ takes 2 more args. with djm@
- (dtucker) [defines.h] Bug #1112: __dead is, well dead. Based on a patch - (dtucker) [defines.h] Bug #1112: __dead is, well dead. Based on a patch
@ -4325,4 +4328,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@ passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.5000 2008/06/13 02:40:55 dtucker Exp $ $Id: ChangeLog,v 1.5001 2008/06/13 04:48:59 dtucker Exp $

4
misc.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: misc.c,v 1.68 2008/06/12 20:38:28 dtucker Exp $ */ /* $OpenBSD: misc.c,v 1.69 2008/06/13 01:38:23 dtucker Exp $ */
/* /*
* Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@ -534,7 +534,7 @@ tilde_expand_filename(const char *filename, uid_t uid)
if ((pw = getpwnam(user)) == NULL) if ((pw = getpwnam(user)) == NULL)
fatal("tilde_expand_filename: No such user %s", user); fatal("tilde_expand_filename: No such user %s", user);
} else if ((pw = getpwuid(uid)) == NULL) /* ~/path */ } else if ((pw = getpwuid(uid)) == NULL) /* ~/path */
fatal("tilde_expand_filename: No such uid %d", uid); fatal("tilde_expand_filename: No such uid %ld", (long)uid);
if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret)) if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret))
fatal("tilde_expand_filename: Path too long"); fatal("tilde_expand_filename: Path too long");