diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-25 07:13:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-25 07:13:36 +0000 |
commit | e33ca8f2585c523b8d9a08eaa6bf7dc4ddabb21b (patch) | |
tree | 1f5f464f34655523052d7eb9f2d84c370819c22a /usr.sbin | |
parent | 3f4ed824e7361dfbc5dae85d166deba9ba40590c (diff) |
sprintf goes away
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpc.pcnfsd/common.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/rpc.pcnfsd/common.h b/usr.sbin/rpc.pcnfsd/common.h index 641d78c7eec..d1ca674d330 100644 --- a/usr.sbin/rpc.pcnfsd/common.h +++ b/usr.sbin/rpc.pcnfsd/common.h @@ -173,9 +173,14 @@ **--------------------------------------------------------------------- */ -#define assert(ex) {if (!(ex)) \ - {char asstmp[256];(void)sprintf(asstmp,"rpc.pcnfsd: Assertion failed: line %d of %s: \"%s\"\n", \ - __LINE__, __FILE__, "ex"); (void)msg_out(asstmp); \ - sleep (10); exit(1);}} - - +#define assert(ex) {\ + if (!(ex)) { \ + char asstmp[256]; \ + (void)snprintf(asstmp, sizeof asstmp, \ + "rpc.pcnfsd: Assertion failed: line %d of %s: \"%s\"\n", \ + __LINE__, __FILE__, "ex"); \ + (void)msg_out(asstmp); \ + sleep (10); \ + exit(1); \ + } \ +} |