Skip to content

Commit

Permalink
enabled debugging symbols in Make, used NULL instead of 0 introduced …
Browse files Browse the repository at this point in the history
…for a typo
  • Loading branch information
antirez committed Jul 7, 2010
1 parent 6a0775f commit 42ba034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
linenoise_example: linenoise.c example.c
$(CC) -Wall -W -Os -o linenoise_example linenoise.c example.c
$(CC) -Wall -W -Os -g -o linenoise_example linenoise.c example.c

clean:
rm -f linenoise_example
2 changes: 1 addition & 1 deletion linenoise.c
Expand Up @@ -396,7 +396,7 @@ int linenoiseHistoryAdd(const char *line) {
char *linecopy;

if (history_max_len == 0) return 0;
if (history == 0) {
if (history == NULL) {
history = malloc(sizeof(char*)*history_max_len);
if (history == NULL) return 0;
memset(history,0,(sizeof(char*)*history_max_len));
Expand Down

0 comments on commit 42ba034

Please sign in to comment.