fix some signed/unsigned warnings and style fixes

This commit is contained in:
Hiltjo Posthuma 2015-03-27 17:03:44 +01:00
parent 57dc7b94b0
commit a9bedca038
5 changed files with 7 additions and 6 deletions

2
comm.c
View File

@ -68,7 +68,7 @@ main(int argc, char *argv[])
eprintf("getline %s:", argv[i]);
if (diff && line[!i][0])
printline(!i, line[!i]);
while (getline(&line[!i], &linelen[!i], fp[!i]) >= 0)
while (getline(&line[!i], &linelen[!i], fp[!i]) > 0)
printline(!i, line[!i]);
if (ferror(fp[!i]))
eprintf("getline %s:", argv[!i]);

View File

@ -39,7 +39,8 @@ mdcheckline(const char *s, uint8_t *md, size_t sz)
static void
mdchecklist(FILE *listfp, struct crypt_ops *ops, uint8_t *md, size_t sz,
int *formatsucks, int *noread, int *nonmatch) {
int *formatsucks, int *noread, int *nonmatch)
{
FILE *fp;
size_t bufsiz = 0;
int r;

4
nl.c
View File

@ -46,8 +46,8 @@ getsection(char *buf, int *section)
static void
nl(const char *fname, FILE *fp)
{
size_t number = startnum, size = 0;
int donumber, oldsection, section = 1, bl = 1;
size_t number = startnum, size = 0, bl = 1;
int donumber, oldsection, section = 1;
char *buf = NULL;
while (getline(&buf, &size, fp) > 0) {

2
sync.c
View File

@ -6,7 +6,7 @@
static void
usage(void)
{
eprintf("usage: sync\n");
eprintf("usage: %s\n", argv0);
}
int

View File

@ -7,7 +7,7 @@
static int aflag = 0;
static size_t *tablist = NULL;
static int tablistlen = 8;
static size_t tablistlen = 8;
static size_t
parselist(const char *s)