X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_misc.c;h=3bfd214c1914163bf0019a4241e52eb11a035a8c;hb=cd6f1f9a84c17dbdf6ab320a04eae300502b898d;hp=06c1a653e7d6a3ac23047288f6e7224e15b83789;hpb=0303cbcec2b262cc3dcf8d89951967d7ba9543c7;p=tfcrypt.git diff --git a/tfc_misc.c b/tfc_misc.c index 06c1a65..3bfd214 100644 --- a/tfc_misc.c +++ b/tfc_misc.c @@ -89,7 +89,7 @@ void tfc_getcurtime(tfc_useconds *tx) memset(&t, 0, sizeof(t)); gettimeofday(&t, NULL); - *tx = t.tv_sec * 1000000 + t.tv_usec; + *tx = (tfc_useconds)t.tv_sec * 1000000 + t.tv_usec; memset(&t, 0, sizeof(t)); } @@ -135,7 +135,7 @@ tfc_fsize tfc_fdgetpos(int fd) off_t t; t = lseek(fd, 0L, SEEK_CUR); - if (t == -1) return NOFSIZE; + if (t == (off_t)-1) return NOFSIZE; return (tfc_fsize)t; }