commit a9bedca038090957ffdffa22d757df3ff6e86960
parent 57dc7b94b08e71f2d15326e1cacb178384261595
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 27 Mar 2015 17:03:44 +0100
fix some signed/unsigned warnings and style fixes
Diffstat:
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/comm.c b/comm.c
@@ -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]);
diff --git a/libutil/crypt.c b/libutil/crypt.c
@@ -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;
diff --git a/nl.c b/nl.c
@@ -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) {
diff --git a/sync.c b/sync.c
@@ -6,7 +6,7 @@
static void
usage(void)
{
- eprintf("usage: sync\n");
+ eprintf("usage: %s\n", argv0);
}
int
diff --git a/unexpand.c b/unexpand.c
@@ -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)