summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-06-11 02:49:38 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-06-11 02:49:38 +0800
commit3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9 (patch)
tree9b7acb5a1c31558bfa7e9c2a38aac44d49ab6232
parentdb56121caeea0a7e20812655ca396071d7b38b3b (diff)
downloadpttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar.gz
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar.bz2
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar.lz
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar.xz
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.tar.zst
pttbbs-3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9.zip
* code refine: prevent arbitary format identifier
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5060 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/util/account.c2
-rw-r--r--pttbbs/util/inndBM.c2
-rw-r--r--pttbbs/util/merge_board.c4
-rw-r--r--pttbbs/util/openticket.c2
-rw-r--r--pttbbs/util/yearsold.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/pttbbs/util/account.c b/pttbbs/util/account.c
index 587ae284..34398700 100644
--- a/pttbbs/util/account.c
+++ b/pttbbs/util/account.c
@@ -69,7 +69,7 @@ my_outs(FILE *fp, char *buf, char mode)
if (state != mode)
fprintf(fp, "[3%cm", state = mode);
if (buf[0]) {
- fprintf(fp, buf);
+ fputs(buf, fp);
buf[0] = 0;
}
}
diff --git a/pttbbs/util/inndBM.c b/pttbbs/util/inndBM.c
index 363220f5..9e9de37a 100644
--- a/pttbbs/util/inndBM.c
+++ b/pttbbs/util/inndBM.c
@@ -127,7 +127,7 @@ int dobbsnnrp(char *serverstr, int serverid,FILE *fpscript)
server[serverid].address,
serverstr);
if(fpscript)
- fprintf(fpscript, buf);
+ fputs(buf, fpscript);
return 0;
}
int main(int argc, char **argv)
diff --git a/pttbbs/util/merge_board.c b/pttbbs/util/merge_board.c
index 4fc643c1..dc4aed0c 100644
--- a/pttbbs/util/merge_board.c
+++ b/pttbbs/util/merge_board.c
@@ -29,7 +29,7 @@ int is_exist(char *brdname) {
int i;
hash_t *n;
- i = string_hash(brdname);
+ i = string_hash((unsigned char*)brdname);
for(n = hash_tbl[i]; n != NULL; n = n->next)
if(strcasecmp(brdname, n->brdname) == 0)
return 1;
@@ -40,7 +40,7 @@ void add_hash(char *brdname) {
int i;
hash_t *n;
- i = string_hash(brdname);
+ i = string_hash((unsigned char*)brdname);
n = malloc(sizeof(*n));
n->brdname = strdup(brdname);
diff --git a/pttbbs/util/openticket.c b/pttbbs/util/openticket.c
index c8af8c1a..b7577151 100644
--- a/pttbbs/util/openticket.c
+++ b/pttbbs/util/openticket.c
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
for (; n < MAX_DES && des[n][0] != 0; n++)
{
- fprintf(fp, des[n]);
+ fputs(des[n], fp);
}
printf("\n\n¶}¼ú®É¶¡¡G %s \n\n"
diff --git a/pttbbs/util/yearsold.c b/pttbbs/util/yearsold.c
index 1418cd59..2982650f 100644
--- a/pttbbs/util/yearsold.c
+++ b/pttbbs/util/yearsold.c
@@ -18,7 +18,7 @@ char buf[], mode;
fprintf(fp, "[3%cm", state = mode);
if (buf[0])
{
- fprintf(fp, buf);
+ fputs(buf, fp);
buf[0] = 0;
}
}