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
+1
-1
@@ -190,7 +190,7 @@
|
||||
#define SHADOW_PASSWD_STRING "x"
|
||||
#endif
|
||||
|
||||
#define SHADOW_SP_FLAG_UNSET ((unsigned long int)-1)
|
||||
#define SHADOW_SP_FLAG_UNSET ((unsigned long)-1)
|
||||
|
||||
#ifdef WITH_AUDIT
|
||||
#ifdef __u8 /* in case we use pam < 0.80 */
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
int get_gid (const char *gidstr, gid_t *gid)
|
||||
{
|
||||
long long int val;
|
||||
long long val;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
int get_pid (const char *pidstr, pid_t *pid)
|
||||
{
|
||||
long long int val;
|
||||
long long val;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
@@ -40,7 +40,7 @@ int get_pid (const char *pidstr, pid_t *pid)
|
||||
*/
|
||||
int get_pidfd_from_fd(const char *pidfdstr)
|
||||
{
|
||||
long long int val;
|
||||
long long val;
|
||||
char *endptr;
|
||||
struct stat st;
|
||||
dev_t proc_st_dev, proc_st_rdev;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
int get_uid (const char *uidstr, uid_t *uid)
|
||||
{
|
||||
long long int val;
|
||||
long long val;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname)
|
||||
{
|
||||
long long int gid;
|
||||
long long gid;
|
||||
char *endptr;
|
||||
|
||||
if (NULL == grname) {
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
*
|
||||
* Returns 0 on failure, 1 on success.
|
||||
*/
|
||||
int getlong (const char *numstr, /*@out@*/long int *result)
|
||||
int getlong (const char *numstr, /*@out@*/long *result)
|
||||
{
|
||||
long val;
|
||||
char *endptr;
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@
|
||||
*
|
||||
* Returns 0 on failure, 1 on success.
|
||||
*/
|
||||
int getulong (const char *numstr, /*@out@*/unsigned long int *result)
|
||||
int getulong (const char *numstr, /*@out@*/unsigned long *result)
|
||||
{
|
||||
unsigned long int val;
|
||||
unsigned long val;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
|
||||
+7
-4
@@ -105,7 +105,7 @@ static int set_prio (const char *value)
|
||||
|
||||
static int set_umask (const char *value)
|
||||
{
|
||||
unsigned long int mask;
|
||||
unsigned long mask;
|
||||
|
||||
if ( (getulong (value, &mask) == 0)
|
||||
|| (mask != (mode_t) mask)) {
|
||||
@@ -483,7 +483,8 @@ void setup_limits (const struct passwd *info)
|
||||
}
|
||||
|
||||
if (strncmp (cp, "pri=", 4) == 0) {
|
||||
long int inc;
|
||||
long inc;
|
||||
|
||||
if ( (getlong (cp + 4, &inc) == 1)
|
||||
&& (inc >= -20) && (inc <= 20)) {
|
||||
errno = 0;
|
||||
@@ -501,7 +502,8 @@ void setup_limits (const struct passwd *info)
|
||||
continue;
|
||||
}
|
||||
if (strncmp (cp, "ulimit=", 7) == 0) {
|
||||
long int blocks;
|
||||
long blocks;
|
||||
|
||||
if ( (getlong (cp + 7, &blocks) == 0)
|
||||
|| (blocks != (int) blocks)
|
||||
|| (set_filesize_limit (blocks) != 0)) {
|
||||
@@ -512,7 +514,8 @@ void setup_limits (const struct passwd *info)
|
||||
continue;
|
||||
}
|
||||
if (strncmp (cp, "umask=", 6) == 0) {
|
||||
unsigned long int mask;
|
||||
unsigned long mask;
|
||||
|
||||
if ( (getulong (cp + 6, &mask) == 0)
|
||||
|| (mask != (mode_t) mask)) {
|
||||
SYSLOG ((LOG_WARN,
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ extern void prefix_endgrent(void)
|
||||
|
||||
extern struct group *prefix_getgr_nam_gid(const char *grname)
|
||||
{
|
||||
long long int gid;
|
||||
long long gid;
|
||||
char *endptr;
|
||||
struct group *g;
|
||||
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ extern int get_gid (const char *gidstr, gid_t *gid);
|
||||
extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname);
|
||||
|
||||
/* getlong.c */
|
||||
extern int getlong (const char *numstr, /*@out@*/long int *result);
|
||||
extern int getlong (const char *numstr, /*@out@*/long *result);
|
||||
|
||||
/* get_pid.c */
|
||||
extern int get_pid (const char *pidstr, pid_t *pid);
|
||||
@@ -172,7 +172,7 @@ extern time_t gettime (void);
|
||||
extern int get_uid (const char *uidstr, uid_t *uid);
|
||||
|
||||
/* getulong.c */
|
||||
extern int getulong (const char *numstr, /*@out@*/unsigned long int *result);
|
||||
extern int getulong (const char *numstr, /*@out@*/unsigned long *result);
|
||||
|
||||
/* fputsx.c */
|
||||
extern /*@null@*/char *fgetsx (/*@returned@*/ /*@out@*/char *, int, FILE *);
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
|
||||
return NULL;
|
||||
}
|
||||
owner_uid = pwd->pw_uid;
|
||||
ret = snprintf(owner_uid_string, sizeof (owner_uid_string), "%lu", (unsigned long int)owner_uid);
|
||||
ret = snprintf(owner_uid_string, sizeof (owner_uid_string), "%lu", (unsigned long)owner_uid);
|
||||
if (ret < 0 || (size_t)ret >= sizeof (owner_uid_string))
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user