diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2002-05-17 05:11:07 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2002-05-17 05:11:07 +0000 |
commit | 47bca8b02cf7a0e85f952078ac29699abfd0891a (patch) | |
tree | cf78d7652b64bccf0e61a4cef6f041a454a5bc4c /usr.bin/tset | |
parent | 03083777d91b03f227eaa9003c00d29751c35249 (diff) | |
download | src-test-47bca8b02cf7a0e85f952078ac29699abfd0891a.tar.gz src-test-47bca8b02cf7a0e85f952078ac29699abfd0891a.zip |
Clean up malloc(3)'s argument. Remove casts which do nothing when we're
using sizeof() anyway. Use slightly more consistent (per-file) error
reporting for malloc(3) returning NULL. If "malloc failed" was being printed,
don't use err(3). If a NULL format is being used, use err(3). In one case
errx(3) was being used with strerror(3), so just use err(3).
Notes
Notes:
svn path=/head/; revision=96785
Diffstat (limited to 'usr.bin/tset')
-rw-r--r-- | usr.bin/tset/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c index 3d6a7c16c227f..a86d7c47b7c23 100644 --- a/usr.bin/tset/map.c +++ b/usr.bin/tset/map.c @@ -83,7 +83,7 @@ add_mapping(port, arg) char *copy, *p, *termp; copy = strdup(arg); - mapp = malloc((u_int)sizeof(MAP)); + mapp = malloc(sizeof(MAP)); if (copy == NULL || mapp == NULL) errx(1, "malloc"); mapp->next = NULL; |