diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-29 02:52:49 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-29 02:52:49 +0000 |
commit | 4b316b4a7d857f02ab850ee4bd6bfa75534d5a42 (patch) | |
tree | f2e68b9d72657f6d8ca4502661919ebb22baa1c4 | |
parent | 5a9b1440924a10ec33538b1684972742c9476d0b (diff) | |
download | tor-4b316b4a7d857f02ab850ee4bd6bfa75534d5a42.tar.gz tor-4b316b4a7d857f02ab850ee4bd6bfa75534d5a42.zip |
some cosmetic fixes
svn:r1747
-rw-r--r-- | src/common/util.c | 6 | ||||
-rw-r--r-- | src/common/util.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c index a7c1adecba..333344959a 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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)) { diff --git a/src/common/util.h b/src/common/util.h index eeaddd994a..6ef0484803 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -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) |