Ignore:
Timestamp:
Dec 5, 2011, 10:30:33 PM (13 years ago)
Author:
katerina
Message:

Fix for ticket #281 (warnings from clang static analyzer).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_login_track.c

    r299 r383  
    298298          while (entry)
    299299            {
    300               n = fwrite(&(entry->data), sizeof(struct sh_track_entry_data), 1, fp);
     300              fwrite(&(entry->data), sizeof(struct sh_track_entry_data),
     301                     1, fp);
    301302              entry = entry->next;
    302303            }
     
    426427    }
    427428
    428   while (*p && (*p == ' ' || *p == '\t')) ++p;
    429 
    430   if (*p && (i < SH_LTRACK_USIZE) && (*p == ':'))
     429  while (p && *p && (*p == ' ' || *p == '\t')) ++p;
     430
     431  if (p && *p && (i < SH_LTRACK_USIZE) && (*p == ':'))
    431432    {
    432433      user[i] = '\0';
     
    970971
    971972  urecord    = load_data(user);
    972   last_login = (urecord->head).last_login;
    973 
    974   urecord = load_data(user);
    975973  last_login = (urecord->head).last_login;
    976974
Note: See TracChangeset for help on using the changeset viewer.