fixed some lint complaints
This commit is contained in:
parent
8e572d417b
commit
e7b4e265d4
|
@ -105,15 +105,15 @@ getgrent(void)
|
|||
struct group *
|
||||
getgrnam(const char *name)
|
||||
{
|
||||
struct group *grp;
|
||||
struct group *g;
|
||||
|
||||
setgrent();
|
||||
while ((grp = getgrent()) != 0)
|
||||
if (!strcmp(grp -> gr_name, name))
|
||||
while ((g = getgrent()) != 0)
|
||||
if (!strcmp(g -> gr_name, name))
|
||||
break;
|
||||
endgrent();
|
||||
if (grp != 0)
|
||||
return grp;
|
||||
if (g != 0)
|
||||
return g;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -121,15 +121,15 @@ getgrnam(const char *name)
|
|||
struct group *
|
||||
getgrgid(int gid)
|
||||
{
|
||||
struct group *grp;
|
||||
struct group *g;
|
||||
|
||||
setgrent();
|
||||
while ((grp = getgrent()) != 0)
|
||||
if (grp -> gr_gid == gid)
|
||||
while ((g = getgrent()) != 0)
|
||||
if (g -> gr_gid == gid)
|
||||
break;
|
||||
endgrent();
|
||||
if (grp != 0)
|
||||
return grp;
|
||||
if (g != 0)
|
||||
return g;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ void
|
|||
sleep(int n)
|
||||
{
|
||||
/* sleep(n) pauses for 'n' seconds by scheduling an alarm interrupt. */
|
||||
unsigned oldalarm;
|
||||
void (*oldsig)(int);
|
||||
unsigned oldalarm = 0;
|
||||
void (*oldsig)(int) = 0;
|
||||
|
||||
if (n <= 0) return;
|
||||
if (setjmp(setjmpbuf)) {
|
||||
|
|
|
@ -44,7 +44,6 @@ tgetent(char *bp, const char *name)
|
|||
FILE *fp;
|
||||
char *file;
|
||||
char *cp;
|
||||
short len = strlen(name);
|
||||
char buf[1024];
|
||||
|
||||
capab = bp;
|
||||
|
|
|
@ -45,7 +45,7 @@ o_print(va_list *ap, int flags, char *s, char c, int precision, int is_signed)
|
|||
long signed_val;
|
||||
unsigned long unsigned_val;
|
||||
char *old_s = s;
|
||||
int i, base;
|
||||
int base;
|
||||
|
||||
switch (flags & (FL_SHORT | FL_LONG)) {
|
||||
case FL_SHORT:
|
||||
|
|
|
@ -18,7 +18,7 @@ off_t _lseek(int fildes, off_t offset, int whence);
|
|||
int
|
||||
fseek(FILE *stream, long int offset, int whence)
|
||||
{
|
||||
int count, adjust = 0;
|
||||
int adjust = 0;
|
||||
long pos;
|
||||
|
||||
stream->_flags &= ~(_IOEOF | _IOERR);
|
||||
|
|
|
@ -13,7 +13,6 @@ int
|
|||
atoi(register const char *nptr)
|
||||
{
|
||||
int total = 0;
|
||||
register unsigned int digit;
|
||||
int minus = 0;
|
||||
|
||||
while (isspace(*nptr)) nptr++;
|
||||
|
|
|
@ -13,7 +13,6 @@ long
|
|||
atol(register const char *nptr)
|
||||
{
|
||||
long total = 0;
|
||||
register unsigned int digit;
|
||||
int minus = 0;
|
||||
|
||||
while (isspace(*nptr)) nptr++;
|
||||
|
|
|
@ -697,7 +697,6 @@ _dbl_ext_cvt(double value, struct EXTEND *e)
|
|||
/* Convert double to extended
|
||||
*/
|
||||
int exponent;
|
||||
register int i;
|
||||
|
||||
value = frexp(value, &exponent);
|
||||
e->sign = value < 0.0;
|
||||
|
|
|
@ -12,12 +12,12 @@ gmtime(register const time_t *timer)
|
|||
{
|
||||
static struct tm br_time;
|
||||
register struct tm *timep = &br_time;
|
||||
time_t time = *timer;
|
||||
time_t tim = *timer;
|
||||
register unsigned long dayclock, dayno;
|
||||
int year = EPOCH_YR;
|
||||
|
||||
dayclock = (unsigned long)time % SECS_DAY;
|
||||
dayno = (unsigned long)time / SECS_DAY;
|
||||
dayclock = (unsigned long)tim % SECS_DAY;
|
||||
dayno = (unsigned long)tim / SECS_DAY;
|
||||
|
||||
timep->tm_sec = dayclock % 60;
|
||||
timep->tm_min = (dayclock % 3600) / 60;
|
||||
|
|
|
@ -286,14 +286,14 @@ parseDate(register char *buf, register const char *p, struct dsttype *dstinfo)
|
|||
static const char *
|
||||
parseRule(register char *buf, register const char *p)
|
||||
{
|
||||
long time;
|
||||
long tim;
|
||||
register const char *q;
|
||||
|
||||
if (!(p = parseDate(buf, p, &dststart))) return NULL;
|
||||
buf += strlen(buf);
|
||||
if (*p == '/') {
|
||||
q = ++p;
|
||||
if (!(p = parseTime(&time, p, &dststart))) return NULL;
|
||||
if (!(p = parseTime(&tim, p, &dststart))) return NULL;
|
||||
while( p != q) *buf++ = *q++;
|
||||
}
|
||||
if (*p != ',') return NULL;
|
||||
|
@ -302,7 +302,7 @@ parseRule(register char *buf, register const char *p)
|
|||
buf += strlen(buf);
|
||||
if (*p == '/') {
|
||||
q = ++p;
|
||||
if (!(p = parseTime(&time, p, &dstend))) return NULL;
|
||||
if (!(p = parseTime(&tim, p, &dstend))) return NULL;
|
||||
while(*buf++ = *q++);
|
||||
}
|
||||
if (*p) return NULL;
|
||||
|
@ -316,7 +316,6 @@ parseRule(register char *buf, register const char *p)
|
|||
static void
|
||||
parseTZ(const char *p)
|
||||
{
|
||||
register int n;
|
||||
long tz, dst = 60 * 60, sign = 1;
|
||||
static char lastTZ[2 * RULE_LEN];
|
||||
static char buffer[RULE_LEN];
|
||||
|
@ -392,11 +391,11 @@ _tzset(void)
|
|||
#elif !defined(_POSIX_SOURCE) && !defined(__USG)
|
||||
|
||||
#if !defined(_MINIX) /* MINIX has no ftime() */
|
||||
struct timeb time;
|
||||
struct timeb tim;
|
||||
|
||||
_ftime(&time);
|
||||
_timezone = time.timezone * 60L;
|
||||
_daylight = time.dstflag;
|
||||
_ftime(&tim);
|
||||
_timezone = tim.timezone * 60L;
|
||||
_daylight = tim.dstflag;
|
||||
#endif
|
||||
|
||||
#endif /* !_POSIX_SOURCE && !__USG */
|
||||
|
|
Loading…
Reference in a new issue