1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
--- cracklib2-2.7.old/cracklib/fascist.c
+++ cracklib2-2.7/cracklib/fascist.c
@@ -6,7 +6,7 @@
* and upwards.
*/
-static char vers_id[] = "fascist.c : v2.3p3 Alec Muffett 14 dec 1997";
+static const char vers_id[] = "fascist.c : v2.3p3 Alec Muffett 14 dec 1997";
#include "crack.h"
#include "packer.h"
@@ -699,7 +699,7 @@
return ("it looks like a National Insurance number.");
}
- if (ptr = FascistGecos(password, getuid()))
+ if ( (ptr = FascistGecos(password, getuid()) ) )
{
return (ptr);
}
--- cracklib2-2.7.old/cracklib/packlib.c
+++ cracklib2-2.7/cracklib/packlib.c
@@ -9,7 +9,7 @@
#include "packer.h"
#include <string.h> /* memset(), strncpy(), strcpy(), strcmp() */
-static char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993";
+static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993";
/* PWClose() already needs this, so forward-declare it */
int PutPW(PWDICT* pwp, char* string);
@@ -50,7 +50,7 @@
return ((PWDICT *) 0);
}
- if (pdesc.wfp = fopen(wname, mode))
+ if ( (pdesc.wfp = fopen(wname, mode) ) )
{
pdesc.flags |= PFOR_USEHWMS;
}
@@ -273,7 +273,7 @@
bptr = buffer;
- for (ostr = data[0]; *(ostr++) = *(bptr++); /* nothing */ );
+ for (ostr = data[0]; ( *(ostr++) = *(bptr++) ); /* nothing */ );
ostr = data[0];
@@ -283,7 +283,7 @@
strcpy(nstr, ostr);
ostr = nstr + *(bptr++);
- while (*(ostr++) = *(bptr++));
+ while ( (*(ostr++) = *(bptr++) ) );
ostr = nstr;
}
--- cracklib2-2.7.old/cracklib/rules.c
+++ cracklib2-2.7/cracklib/rules.c
@@ -6,7 +6,7 @@
* and upwards.
*/
-static char vers_id[] = "rules.c : v5.0p3 Alec Muffett 20 May 1993";
+static const char vers_id[] = "rules.c : v5.0p3 Alec Muffett 20 May 1993";
#ifndef IN_CRACKLIB
@@ -23,7 +23,7 @@
int val;
char *a, *b, *c, *d, *e, *f, *g;
{
- fprintf(stderr, a, b, c, d, e, f);
+ fprintf(stderr, a, b, c, d, e, f, g );
}
#endif
@@ -473,7 +473,7 @@
Debug(1, "Mangle: '>' weird argument in '%s'\n", control);
return ((char *) 0);
}
- if (strlen(area) <= limit)
+ if ( (int) strlen(area) <= limit)
{
return ((char *) 0);
}
@@ -492,7 +492,7 @@
Debug(1, "Mangle: '<' weird argument in '%s'\n", control);
return ((char *) 0);
}
- if (strlen(area) >= limit)
+ if ( (int) strlen(area) >= limit)
{
return ((char *) 0);
}
--- cracklib2-2.7.old/cracklib/stringlib.c
+++ cracklib2-2.7/cracklib/stringlib.c
@@ -11,7 +11,7 @@
#include <string.h> /* strcpy(), strlen() */
#include <stdlib.h> /* malloc() */
-static char vers_id[] = "stringlib.c : v2.3p2 Alec Muffett 18 May 1993";
+static const char vers_id[] = "stringlib.c : v2.3p2 Alec Muffett 18 May 1993";
char
Chop(string)
--- cracklib2-2.7.old/util/packer.c
+++ cracklib2-2.7/util/packer.c
@@ -16,8 +16,8 @@
int argc;
char *argv[];
{
- int32 readed;
- int32 wrote;
+ unsigned long readed;
+ unsigned long wrote;
PWDICT *pwp;
char buffer[STRINGSIZE];
--- cracklib2-2.7.old/util/testlib.c
+++ cracklib2-2.7/util/testlib.c
@@ -20,7 +20,7 @@
while (fgets (buffer, STRINGSIZE, stdin))
{
- char *val;
+ const char *val;
Chop(buffer);
--- cracklib2-2.7.old/util/testnum.c
+++ cracklib2-2.7/util/testnum.c
@@ -30,9 +30,9 @@
{
char *c;
- sscanf (buffer, "%lu", &i);
+ sscanf (buffer, "%u", &i);
- printf ("(word %ld) ", i);
+ printf ("(word %d) ", i);
if (!(c = (char *) GetPW (pwp, i)))
{
--- cracklib2-2.7.old/util/teststr.c
+++ cracklib2-2.7/util/teststr.c
@@ -31,7 +31,7 @@
Chop(buffer);
i = FindPW(pwp, buffer);
- printf ("%s: %lu%s\n", buffer, i, (i==PW_WORDS(pwp) ? " **** NOT FOUND ****" : ""));
+ printf ("%s: %u%s\n", buffer, i, (i==PW_WORDS(pwp) ? " **** NOT FOUND ****" : ""));
}
return (0);
|