* Silenced a couple more warn_unused_result warnings
authorArt Cancro <ajc@citadel.org>
Mon, 14 Dec 2009 17:13:03 +0000 (17:13 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 14 Dec 2009 17:13:03 +0000 (17:13 +0000)
citadel/config.c

index fb9df692df1f2443df30043fa774ec53bee70b23..bc42c559a76d36a8985c76e0d57766f406bd8c37 100644 (file)
@@ -47,6 +47,7 @@ struct config config;
 void get_config(void) {
        FILE *cfp;
        struct stat st;
+       int rv;
 
        if (chdir(ctdl_bbsbase_dir) != 0) {
                fprintf(stderr,
@@ -66,7 +67,7 @@ void get_config(void) {
                                strerror(errno));
                exit(CTDLEXIT_CONFIG);
        }
-       fread((char *) &config, sizeof(struct config), 1, cfp);
+       rv = fread((char *) &config, sizeof(struct config), 1, cfp);
        if (fstat(fileno(cfp), &st)) {
                perror(file_citadel_config);
                exit(CTDLEXIT_CONFIG);
@@ -167,11 +168,12 @@ void get_config(void) {
 void put_config(void)
 {
        FILE *cfp;
+       int rv;
 
        if ((cfp = fopen(file_citadel_config, "rb+")) == NULL)
                perror(file_citadel_config);
        else {
-               fwrite((char *) &config, sizeof(struct config), 1, cfp);
+               rv = fwrite((char *) &config, sizeof(struct config), 1, cfp);
                fclose(cfp);
        }
 }