Skip to content
Myr

Get rid of non ANSI C strdup().

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by antirez · committed by antirez · parent e10bc60 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:kilo.c+3 added-1 removed
788 unmodified lines
789 FILE *fp;790791 E.dirty = 0;792 free(E.filename);793 E.filename = strdup(filename);793 size_t fnlen = strlen(filename)+1;794 E.filename = malloc(fnlen);795 memcpy(E.filename,filename,fnlen);796797 fp = fopen(filename,"r");798 if (!fp) {799 if (errno != ENOENT) {
500 unmodified lines