From f50d9b2ffb1c435e20e14887acca5dda41a65a81 Mon Sep 17 00:00:00 2001 From: Gabor Kovesdan Date: Thu, 17 May 2012 13:08:30 +0000 Subject: - Fix -o option that was broken by my clang compile fix Submitted by: Oleg Moskalenko --- usr.bin/sort/sort.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr.bin/sort') 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; -- cgit v1.3