diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/sync.c b/coreutils/sync.c index b9f52c8b0..cb4690c02 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -26,9 +26,9 @@ extern int sync_main(int argc, char * * argv) { - if ( **(argv+1) == '-' ) { + if ( argc>1 && **(argv+1) == '-' ) { usage( "sync\nWrite all buffered filesystem blocks to disk.\n"); } - return sync(); + exit( sync()); } |