lib/, src/: str2*(): Rename functions and reorder parameters
This makes them compatible with liba2i's functions. Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
b085c3f612
commit
f39ac101ff
+7
-7
@@ -118,7 +118,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[2][0] == '\0') {
|
||||
spwd.sp_lstchg = -1;
|
||||
} else {
|
||||
if (getlong(fields[2], &spwd.sp_lstchg) == -1)
|
||||
if (str2sl(&spwd.sp_lstchg, fields[2]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_lstchg < 0)
|
||||
return 0;
|
||||
@@ -131,7 +131,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[3][0] == '\0') {
|
||||
spwd.sp_min = -1;
|
||||
} else {
|
||||
if (getlong(fields[3], &spwd.sp_min) == -1)
|
||||
if (str2sl(&spwd.sp_min, fields[3]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_min < 0)
|
||||
return 0;
|
||||
@@ -144,7 +144,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[4][0] == '\0') {
|
||||
spwd.sp_max = -1;
|
||||
} else {
|
||||
if (getlong(fields[4], &spwd.sp_max) == -1)
|
||||
if (str2sl(&spwd.sp_max, fields[4]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_max < 0)
|
||||
return 0;
|
||||
@@ -171,7 +171,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[5][0] == '\0') {
|
||||
spwd.sp_warn = -1;
|
||||
} else {
|
||||
if (getlong(fields[5], &spwd.sp_warn) == -1)
|
||||
if (str2sl(&spwd.sp_warn, fields[5]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_warn < 0)
|
||||
return 0;
|
||||
@@ -185,7 +185,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[6][0] == '\0') {
|
||||
spwd.sp_inact = -1;
|
||||
} else {
|
||||
if (getlong(fields[6], &spwd.sp_inact) == -1)
|
||||
if (str2sl(&spwd.sp_inact, fields[6]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_inact < 0)
|
||||
return 0;
|
||||
@@ -199,7 +199,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[7][0] == '\0') {
|
||||
spwd.sp_expire = -1;
|
||||
} else {
|
||||
if (getlong(fields[7], &spwd.sp_expire) == -1)
|
||||
if (str2sl(&spwd.sp_expire, fields[7]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_expire < 0)
|
||||
return 0;
|
||||
@@ -213,7 +213,7 @@ static struct spwd *my_sgetspent (const char *string)
|
||||
if (fields[8][0] == '\0') {
|
||||
spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
|
||||
} else {
|
||||
if (getulong(fields[8], &spwd.sp_flag) == -1)
|
||||
if (str2ul(&spwd.sp_flag, fields[8]) == -1)
|
||||
return 0;
|
||||
if (spwd.sp_flag < 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user