diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-07-06 02:07:46 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-07-06 02:07:46 +0000 |
commit | 428205dfb2d9eb6cc21ad67ca83998115e665458 (patch) | |
tree | 68cccf0308046dc6bca823670194fdb2d8c98a8d /games/hack/hack.shk.c | |
parent | 9e3628d296cdd659839a7b772c967f101c2d6efd (diff) |
convert a bunch of strn{cpy,cat}->strl{cpy,cat}
pjanzen@ ok
Diffstat (limited to 'games/hack/hack.shk.c')
-rw-r--r-- | games/hack/hack.shk.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/games/hack/hack.shk.c b/games/hack/hack.shk.c index 3de4e273245..eb72e05571a 100644 --- a/games/hack/hack.shk.c +++ b/games/hack/hack.shk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.shk.c,v 1.9 2003/05/19 06:30:56 pjanzen Exp $ */ +/* $OpenBSD: hack.shk.c,v 1.10 2003/07/06 02:07:45 avsm Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -62,7 +62,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: hack.shk.c,v 1.9 2003/05/19 06:30:56 pjanzen Exp $"; +static const char rcsid[] = "$OpenBSD: hack.shk.c,v 1.10 2003/07/06 02:07:45 avsm Exp $"; #endif /* not lint */ #include <stdio.h> @@ -332,8 +332,7 @@ inshop() /* He seems to be new here */ ESHK(shopkeeper)->visitct = 0; ESHK(shopkeeper)->following = 0; - (void) strncpy(ESHK(shopkeeper)->customer,plname,PL_NSIZ-1); - ESHK(shopkeeper)->customer[PL_NSIZ-1] = '\0'; + (void) strlcpy(ESHK(shopkeeper)->customer,plname,PL_NSIZ); NOTANGRY(shopkeeper) = 1; } if(!ESHK(shopkeeper)->following) { |