[hackers] [sbase] fix some signed/unsigned warnings and style fixes || Hiltjo Posthuma
 
commit a9bedca038090957ffdffa22d757df3ff6e86960
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date:   Fri Mar 27 17:03:44 2015 +0100
    fix some signed/unsigned warnings and style fixes
diff --git a/comm.c b/comm.c
index ac60d0d..ee79047 100644
--- a/comm.c
+++ b/comm.c
_AT_@ -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
index 7f76047..4591066 100644
--- a/libutil/crypt.c
+++ b/libutil/crypt.c
_AT_@ -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
index e78c5dc..7609d5e 100644
--- a/nl.c
+++ b/nl.c
_AT_@ -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
index a766fbc..5d92233 100644
--- a/sync.c
+++ b/sync.c
_AT_@ -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
index c0f6d38..17dd532 100644
--- a/unexpand.c
+++ b/unexpand.c
_AT_@ -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)
Received on Sat Mar 28 2015 - 22:03:53 CET
This archive was generated by hypermail 2.3.0
: Sat Mar 28 2015 - 22:12:30 CET