diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 12:16:32 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 12:16:32 +0800 |
commit | 1465912d8d554cc8b81241b9163be6f72176ffb2 (patch) | |
tree | 2dc9f88e475e69e942acf281c3305b90bb40a4c1 /mbbsd | |
parent | 1163aed3f3340d1331fb859413000b7e11aa51e4 (diff) | |
download | pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar.gz pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar.bz2 pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar.lz pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar.xz pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.tar.zst pttbbs-1465912d8d554cc8b81241b9163be6f72176ffb2.zip |
fix XXX
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2599 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/friend.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c index 1c419fb6..2e487975 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -94,17 +94,13 @@ void friend_special(void) { char genbuf[70], i, fname[70]; - + FILE *fp; friend_file[FRIEND_SPECIAL] = special_list; for (i = 0; i <= 9; i++) { snprintf(genbuf, sizeof(genbuf), " (\033[36m%d\033[m) .. ", i); special_des[5] = i + '0'; setuserfile(fname, special_des); - if (dashf(fname)) { - /* XXX no NULL check?? */ - FILE *fp = fopen(fname, "r"); - - assert(fp); + if( (fp = fopen(fname, "r")) != NULL ){ fgets(genbuf + 15, 40, fp); genbuf[47] = 0; fclose(fp); |