diff options
Diffstat (limited to 'src/note.c')
-rw-r--r-- | src/note.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -59,13 +59,9 @@ HTABLE_PROTOTYPE(htp, note_gc_hash) char *generate_note(const char *str) { char *sha1 = mem_malloc(SHA1_DIGESTLEN * 2 + 1); - char *notepath, *s; + char *notepath; FILE *fp; - /* Temporary hack */ - asprintf(&s, "%s\n", str); - str = s; - sha1_digest(str, sha1); asprintf(¬epath, "%s%s", path_notes, sha1); fp = fopen(notepath, "w"); @@ -74,7 +70,6 @@ char *generate_note(const char *str) fputs(str, fp); file_close(fp, __FILE_POS__); - mem_free(s); mem_free(notepath); return sha1; } |