some cosmetic fixes

svn:r1747
This commit is contained in:
Roger Dingledine 2004-04-29 02:52:49 +00:00
parent 5a9b144092
commit 4b316b4a7d
2 changed files with 4 additions and 5 deletions

View File

@ -1075,11 +1075,13 @@ write_str_to_file(const char *fname, const char *str)
if (!(file = fdopen(fd, "w"))) {
log(LOG_WARN, "Couldn't fdopen %s for writing: %s", tempname,
strerror(errno));
close(fd); return -1;
close(fd);
return -1;
}
if (fputs(str,file) == EOF) {
log(LOG_WARN, "Error writing to %s: %s", tempname, strerror(errno));
fclose(file); return -1;
fclose(file);
return -1;
}
fclose(file);
if (rename(tempname, fname)) {

View File

@ -77,9 +77,6 @@ char *tor_strndup(const char *s, size_t n);
void tor_strlower(char *s);
#ifdef UNALIGNED_INT_ACCESS_OK
/* XXX Not actually used yet, but would probably be faster on non-sun
* hardare.
*/
#define get_uint16(cp) (*(uint16_t*)(cp))
#define get_uint32(cp) (*(uint32_t*)(cp))
#define set_uint16(cp,v) do { *(uint16_t*)(cp) = (v); } while (0)