diff options
author | Erik Troan <ewt@redhat.com> | 2001-11-24 13:41:23 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-11-24 13:41:23 +0000 |
commit | 78046b966823980be72890e0a46ff066b8f64744 (patch) | |
tree | 52e46f66f15eb5c9caea1ed375c6f64edb332112 /loader | |
parent | 71bd7ddb8f91fd99009c626e05c218fc6fb28d51 (diff) | |
download | anaconda-78046b966823980be72890e0a46ff066b8f64744.tar.gz anaconda-78046b966823980be72890e0a46ff066b8f64744.tar.xz anaconda-78046b966823980be72890e0a46ff066b8f64744.zip |
1) removed some compiler warnings
2) shortened tick code (untested)
Diffstat (limited to 'loader')
-rw-r--r-- | loader/mediacheck.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/loader/mediacheck.c b/loader/mediacheck.c index c476bb763..04e5f56d8 100644 --- a/loader/mediacheck.c +++ b/loader/mediacheck.c @@ -83,8 +83,6 @@ int checkmd5sum(int isofd, char *mediasum, char *computedsum, checkCallback cb, void *cbdata) { int nread; int i; - int dirty; - int sector; int appdata_start_offset, appdata_end_offset; int nattempt; unsigned int bufsize = 32768; @@ -169,23 +167,14 @@ int checkmd5sum(int isofd, char *mediasum, char *computedsum, static void readCB(void *co, long long pos) { struct progressCBdata *data = co; - static tick = 0; - char *tickmark; + static int tick = 0; + char tickmark[2] = "-"; + char * ticks = "-\\|/"; newtScaleSet(data->scale, pos); tick++; - if (tick < 100) - tickmark = "-"; - if (tick >= 100 && tick < 200) - tickmark = "\\"; - else if (tick >= 200 && tick < 300) - tickmark = "|"; - else if (tick >= 300 && tick < 400) - tickmark = "/"; - else if (tick >= 400) { - tick = 0; - tickmark = "-"; - } + if (tick >= 400) tick = 0; + *tickmark = ticks[tick % 100]; newtLabelSetText(data->label, tickmark); newtRefresh(); |