lib/, src/: Say 'long' instead of 'long int'
We were using 'long' in most places, so be consistent and use it everywhere. Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
44b8f7b3ef
commit
4f16458b6c
+8
-7
@@ -96,7 +96,7 @@ static off_t lookup_faillog(struct faillog *fl, uid_t uid)
|
||||
if (__builtin_mul_overflow(uid, sizeof(*fl), &offset)) {
|
||||
fprintf(stderr,
|
||||
_("%s: Failed to get the entry for UID %lu\n"),
|
||||
Prog, (unsigned long int)uid);
|
||||
Prog, (unsigned long)uid);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ static off_t lookup_faillog(struct faillog *fl, uid_t uid)
|
||||
if (fread(fl, sizeof(*fl), 1, fail) != 1) {
|
||||
fprintf(stderr,
|
||||
_("%s: Failed to get the entry for UID %lu\n"),
|
||||
Prog, (unsigned long int)uid);
|
||||
Prog, (unsigned long)uid);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
@@ -246,7 +246,7 @@ static bool reset_one (uid_t uid)
|
||||
|
||||
fprintf (stderr,
|
||||
_("%s: Failed to reset fail count for UID %lu\n"),
|
||||
Prog, (unsigned long int)uid);
|
||||
Prog, (unsigned long)uid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ static bool setmax_one (uid_t uid, short max)
|
||||
|
||||
fprintf (stderr,
|
||||
_("%s: Failed to set max for UID %lu\n"),
|
||||
Prog, (unsigned long int)uid);
|
||||
Prog, (unsigned long)uid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ static bool set_locktime_one (uid_t uid, long locktime)
|
||||
|
||||
fprintf (stderr,
|
||||
_("%s: Failed to set locktime for UID %lu\n"),
|
||||
Prog, (unsigned long int)uid);
|
||||
Prog, (unsigned long)uid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -557,9 +557,10 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
case 'm':
|
||||
{
|
||||
long int lmax;
|
||||
long lmax;
|
||||
|
||||
if ( (getlong (optarg, &lmax) == 0)
|
||||
|| ((long int)(short) lmax != lmax)) {
|
||||
|| ((long)(short) lmax != lmax)) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid numeric argument '%s'\n"),
|
||||
Prog, optarg);
|
||||
|
||||
+1
-1
@@ -511,7 +511,7 @@ static void check_flags (void)
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
_("%s: GID '%lu' already exists\n"),
|
||||
Prog, (unsigned long int) group_id);
|
||||
Prog, (unsigned long) group_id);
|
||||
exit (E_GID_IN_USE);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -339,7 +339,7 @@ static void check_new_gid (void)
|
||||
*/
|
||||
fprintf (stderr,
|
||||
_("%s: GID '%lu' already exists\n"),
|
||||
Prog, (unsigned long int) group_newid);
|
||||
Prog, (unsigned long) group_newid);
|
||||
exit (E_GID_IN_USE);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -120,7 +120,7 @@ static void print_one (/*@null@*/const struct passwd *pw)
|
||||
if (fread (&ll, sizeof (ll), 1, lastlogfile) != 1) {
|
||||
fprintf (stderr,
|
||||
_("%s: Failed to get the entry for UID %lu\n"),
|
||||
Prog, (unsigned long int)pw->pw_uid);
|
||||
Prog, (unsigned long)pw->pw_uid);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
@@ -242,7 +242,7 @@ static void update_one (/*@null@*/const struct passwd *pw)
|
||||
if (fwrite (&ll, sizeof(ll), 1, lastlogfile) != 1) {
|
||||
fprintf (stderr,
|
||||
_("%s: Failed to update the entry for UID %lu\n"),
|
||||
Prog, (unsigned long int)pw->pw_uid);
|
||||
Prog, (unsigned long)pw->pw_uid);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -206,8 +206,8 @@ int main(int argc, char **argv)
|
||||
(getgid() != st.st_gid)) {
|
||||
fprintf(stderr, _( "%s: Target process is owned by a different user: uid:%lu pw_uid:%lu st_uid:%lu, gid:%lu pw_gid:%lu st_gid:%lu\n" ),
|
||||
Prog,
|
||||
(unsigned long int)getuid(), (unsigned long int)pw->pw_uid, (unsigned long int)st.st_uid,
|
||||
(unsigned long int)getgid(), (unsigned long int)pw->pw_gid, (unsigned long int)st.st_gid);
|
||||
(unsigned long)getuid(), (unsigned long)pw->pw_uid, (unsigned long)st.st_uid,
|
||||
(unsigned long)getgid(), (unsigned long)pw->pw_gid, (unsigned long)st.st_gid);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -134,8 +134,8 @@ int main(int argc, char **argv)
|
||||
(getgid() != st.st_gid)) {
|
||||
fprintf(stderr, _( "%s: Target process is owned by a different user: uid:%lu pw_uid:%lu st_uid:%lu, gid:%lu pw_gid:%lu st_gid:%lu\n" ),
|
||||
Prog,
|
||||
(unsigned long int)getuid(), (unsigned long int)pw->pw_uid, (unsigned long int)st.st_uid,
|
||||
(unsigned long int)getgid(), (unsigned long int)pw->pw_gid, (unsigned long int)st.st_gid);
|
||||
(unsigned long)getuid(), (unsigned long)pw->pw_uid, (unsigned long)st.st_uid,
|
||||
(unsigned long)getgid(), (unsigned long)pw->pw_gid, (unsigned long)st.st_gid);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -875,7 +875,7 @@ static struct group * get_local_group(char * grp_name)
|
||||
{
|
||||
const struct group *grp;
|
||||
struct group *result_grp = NULL;
|
||||
long long int gid;
|
||||
long long gid;
|
||||
char *endptr;
|
||||
|
||||
gid = strtoll (grp_name, &endptr, 10);
|
||||
|
||||
+4
-4
@@ -319,20 +319,20 @@ static struct ulong_range getulong_range(const char *str)
|
||||
errno = 0;
|
||||
first = strtoll(str, &pos, 10);
|
||||
if (('\0' == *str) || ('-' != *pos ) || (ERANGE == errno) ||
|
||||
(first != (unsigned long int)first))
|
||||
(first != (unsigned long)first))
|
||||
goto out;
|
||||
|
||||
errno = 0;
|
||||
last = strtoll(pos + 1, &pos, 10);
|
||||
if (('\0' != *pos ) || (ERANGE == errno) ||
|
||||
(last != (unsigned long int)last))
|
||||
(last != (unsigned long)last))
|
||||
goto out;
|
||||
|
||||
if (first > last)
|
||||
goto out;
|
||||
|
||||
result.first = (unsigned long int)first;
|
||||
result.last = (unsigned long int)last;
|
||||
result.first = (unsigned long)first;
|
||||
result.last = (unsigned long)last;
|
||||
out:
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user