Mercurial > noffle
comparison src/group.c @ 243:6eb6c912a0e4 noffle
[svn] * src/group.c: Make comparison against NULL explicit in an if containing
an assignment, as I'm sad enough to think it is safer if it is obvious
that the assignment is meant to be there.
author | bears |
---|---|
date | Fri, 15 Mar 2002 10:49:56 +0000 |
parents | 1ad2602f57db |
children | 0340b9c17edc |
comparison
equal
deleted
inserted
replaced
242:aa9e65f63755 | 243:6eb6c912a0e4 |
---|---|
5 the groups we know of. One database record is cached in the global struct | 5 the groups we know of. One database record is cached in the global struct |
6 grp. Group information is transfered between the grp and the database by | 6 grp. Group information is transfered between the grp and the database by |
7 loadGrp() and saveGrp(). This is done transparently. Access to the groups | 7 loadGrp() and saveGrp(). This is done transparently. Access to the groups |
8 database is done by group name, by the functions defined in group.h. | 8 database is done by group name, by the functions defined in group.h. |
9 | 9 |
10 $Id: group.c 358 2001-12-18 15:27:08Z mirkol $ | 10 $Id: group.c 374 2002-03-15 10:49:56Z bears $ |
11 */ | 11 */ |
12 | 12 |
13 #if HAVE_CONFIG_H | 13 #if HAVE_CONFIG_H |
14 #include <config.h> | 14 #include <config.h> |
15 #endif | 15 #endif |
432 if ( strpbrk( name, illegalchars ) ) | 432 if ( strpbrk( name, illegalchars ) ) |
433 return FALSE; | 433 return FALSE; |
434 | 434 |
435 /* Find "all", "all.*", "*.all" or "*.all.*" */ | 435 /* Find "all", "all.*", "*.all" or "*.all.*" */ |
436 pname = name; | 436 pname = name; |
437 while ( ppat = strstr( pname, "all" ) ) | 437 while ( ( ppat = strstr( pname, "all" ) ) != NULL ) |
438 { | 438 { |
439 if ( ( ppat == name || *(ppat - 1) == '.' ) | 439 if ( ( ppat == name || *(ppat - 1) == '.' ) |
440 && ( *(ppat+4) == '\0' || *(ppat+4) == '.' ) ) | 440 && ( *(ppat+4) == '\0' || *(ppat+4) == '.' ) ) |
441 return FALSE; | 441 return FALSE; |
442 else | 442 else |