X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=client-src%2Fsendsize.c;h=083ec65e665850744e800a033a0d7d4b82e854bd;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=6d9f0c28f0bf83c7b1ba57f15dbb44ece9ecf566;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/client-src/sendsize.c b/client-src/sendsize.c index 6d9f0c2..083ec65 100644 --- a/client-src/sendsize.c +++ b/client-src/sendsize.c @@ -140,6 +140,11 @@ main( (void)argc; /* Quiet unused parameter warning */ (void)argv; /* Quiet unused parameter warning */ + if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) { + printf("sendsize-%s\n", VERSION); + return (0); + } + /* initialize */ /* @@ -1007,7 +1012,6 @@ generic_calc_estimates( char *file_include = NULL; times_t start_time; FILE *dumpout = NULL; - off_t size = (off_t)1; char *line = NULL; char *match_expr; amwait_t wait_status; @@ -1097,7 +1101,7 @@ generic_calc_estimates( } match_expr = vstralloc(" %d SIZE %lld", NULL); len = strlen(est->qamname); - for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) { + for(; (line = agets(dumpout)) != NULL; free(line)) { long long size_ = (long long)0; if (line[0] == '\0' || (int)strlen(line) <= len) continue; @@ -1110,7 +1114,6 @@ generic_calc_estimates( level, size_); } - size = (off_t)size_; } amfree(match_expr);