summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-05-17 19:46:57 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-05-17 19:46:57 +0800
commitdef3acc0ff6ac2eb6ef87740a8f39b55894a49c8 (patch)
treedf2a615b11ccd8a26ccc5d20630b61681d417375 /mbbsd
parent6ace55395308b16ef451d8fc99cc52bdc64fa467 (diff)
downloadpttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar.gz
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar.bz2
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar.lz
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar.xz
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.tar.zst
pttbbs-def3acc0ff6ac2eb6ef87740a8f39b55894a49c8.zip
warning freed
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3357 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/friend.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 7d7d3720..c73932af 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -188,12 +188,10 @@ delete_friend_from_file(const char *file, const char *string, int case_sensitiv
sprintf(fnew, "%s.%3.3X", file, (unsigned int)(random() & 0xFFF));
if ((fp = fopen(file, "r")) && (nfp = fopen(fnew, "w"))) {
- int length = strlen(string);
-
while (fgets(genbuf, sizeof(genbuf), fp))
if ((genbuf[0] > ' ')) {
char buf[32];
- sscanf(genbuf, " %s", &buf);
+ sscanf(genbuf, " %s", buf);
if (((case_sensitive && strcmp(buf, string)) ||
(!case_sensitive && strcasecmp(buf, string))))
fputs(genbuf, nfp);