mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-19 18:00:33 +01:00
some cosmetic fixes
svn:r1747
This commit is contained in:
parent
5a9b144092
commit
4b316b4a7d
@ -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)) {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user