Use power of 2 for STAR_COUNT

This commit is contained in:
Dan Walsh 2013-10-11 10:42:06 -04:00 committed by Stephen Smalley
parent 48663d5ca3
commit 6020fb0b1e
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ static int restore(FTSENT *ftsent, int recurse)
r_opts->count++;
if (r_opts->count % STAR_COUNT == 0) {
if (r_opts->progress == 1) {
fprintf(stdout, "*");
fprintf(stdout, "\r%luk", (size_t) r_opts->count / STAR_COUNT );
} else {
if (r_opts->nfile > 0) {
progress = (r_opts->count < r_opts->nfile) ? (100.0 * r_opts->count / r_opts->nfile) : 100;

View File

@ -16,7 +16,7 @@
#include <limits.h>
#include <stdint.h>
#define STAR_COUNT 1000
#define STAR_COUNT 1024
/* Things that need to be init'd */
struct restore_opts {