diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-14 20:02:08 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-14 20:02:08 +0000 |
commit | 6274873c26f9c52e2e5158e0210b2542e9fed89f (patch) | |
tree | e56c08d493b487293b1a837fe7302b77233873e5 /usr.bin/grep | |
parent | a0eb48f7dcc28b2d469f7d6ebb05cb488b1e6219 (diff) |
Use long long rather than off_t for line_no to ensure that it's always
64 bits.
ok kettenis@
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/grep.h | 4 | ||||
-rw-r--r-- | usr.bin/grep/util.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index 71379a8ca8b..21b1cab10f8 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: grep.h,v 1.23 2015/12/07 18:50:06 mmcc Exp $ */ +/* $OpenBSD: grep.h,v 1.24 2015/12/14 20:02:07 mmcc Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -43,7 +43,7 @@ typedef struct { size_t len; - off_t line_no; + long long line_no; off_t off; char *file; char *dat; diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index d5bbed7df1e..dbad698b71f 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.51 2015/12/07 18:50:06 mmcc Exp $ */ +/* $OpenBSD: util.c,v 1.52 2015/12/14 20:02:07 mmcc Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -623,7 +623,7 @@ printline(str_t *line, int sep, regmatch_t *pmatch) if (nflag) { if (n) putchar(sep); - printf("%lld", (long long)line->line_no); + printf("%lld", line->line_no); ++n; } if (bflag) { |