diff options
| author | Gabor Kovesdan <gabor@FreeBSD.org> | 2012-05-17 13:08:30 +0000 |
|---|---|---|
| committer | Gabor Kovesdan <gabor@FreeBSD.org> | 2012-05-17 13:08:30 +0000 |
| commit | f50d9b2ffb1c435e20e14887acca5dda41a65a81 (patch) | |
| tree | 4dcbe90187af8a2fb9003424db25831d0fef02ff /usr.bin/sort | |
| parent | ce0080980cd498f5986b088f379e03b44c99e2f1 (diff) | |
- Fix -o option that was broken by my clang compile fix
Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Notes
svn path=/head/; revision=235546
Diffstat (limited to 'usr.bin/sort')
| -rw-r--r-- | usr.bin/sort/sort.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c index 6bd7b3848da8..f802ced04e01 100644 --- a/usr.bin/sort/sort.c +++ b/usr.bin/sort/sort.c @@ -1049,9 +1049,8 @@ main(int argc, char **argv) sort_opts_vals.mflag = true; break; case 'o': - outfile = sort_realloc(outfile, sizeof(char) * - (strlen(optarg) + 1)); - strlcpy(outfile, optarg, strlen(outfile)); + outfile = sort_realloc(outfile, (strlen(optarg) + 1)); + strcpy(outfile, optarg); break; case 's': sort_opts_vals.sflag = true; |
