]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
make writing descs work
authorRoger Dingledine <arma@torproject.org>
Fri, 26 Sep 2003 21:26:25 +0000 (21:26 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 26 Sep 2003 21:26:25 +0000 (21:26 +0000)
svn:r492

src/common/util.c

index a7a35acc94cedf9dfac9f6983ac3ce77d1b347bf..2e0f39c96c56a8845f488a2b184ae92f81e2a968 100644 (file)
@@ -380,7 +380,7 @@ write_str_to_file(const char *fname, const char *str)
         strerror(errno));
     close(fd); return -1;
   }
-  if (fputs(str,file)) {
+  if (fputs(str,file) == EOF) {
     log(LOG_ERR, "Error writing to %s: %s", tempname, strerror(errno));
     fclose(file); return -1;
   }