brd = line = conc = NULL;
/* perhaps we are adding to an existing list? */
- while (p->next != NULL)
+ while (p->next)
p = p->next;
/* file must start with a BEGIN */
struct cnode *n;
n = kmalloc(sizeof(struct cnode), GFP_ATOMIC);
- if (n != NULL) {
+ if (n) {
memset((char *)n, 0, sizeof(struct cnode));
n->type = t;
}
p = &dgap_head;
- while (p->next != NULL) {
+ while (p->next) {
prev = p;
p = p->next;
* Keep walking thru the list till we
* find the next board.
*/
- while (p->next != NULL) {
+ while (p->next) {
prev2 = p;
p = p->next;
if (p->type == BNODE) {
*/
speed = p->u.conc.speed;
q = p->next;
- if ((q != NULL) && (q->type == MNODE)) {
+ if (q && (q->type == MNODE)) {
*ptr = (p->u.conc.nport + 0x80);
ptr++;
p = q;
- while ((q->next != NULL) &&
- (q->next->type) == MNODE) {
-
+ while (q->next && (q->next->type) == MNODE) {
*ptr = (q->u.module.nport + 0x80);
ptr++;
p = q;