summaryrefslogtreecommitdiffstats
path: root/usr.bin/sort
diff options
context:
space:
mode:
authorgabor <gabor@FreeBSD.org>2012-05-17 13:08:30 +0000
committergabor <gabor@FreeBSD.org>2012-05-17 13:08:30 +0000
commit57fe23061ad58a10134e056279d29b1e5140a581 (patch)
tree4dcbe90187af8a2fb9003424db25831d0fef02ff /usr.bin/sort
parent8d93169f7ccbcc10d289a7352120964d91d3e78a (diff)
downloadFreeBSD-src-57fe23061ad58a10134e056279d29b1e5140a581.zip
FreeBSD-src-57fe23061ad58a10134e056279d29b1e5140a581.tar.gz
- Fix -o option that was broken by my clang compile fix
Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Diffstat (limited to 'usr.bin/sort')
-rw-r--r--usr.bin/sort/sort.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 6bd7b38..f802ced 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;
OpenPOWER on IntegriCloud