]> git.lizzy.rs Git - linenoise.git/commitdiff
enabled debugging symbols in Make, used NULL instead of 0 introduced for a typo
authorantirez <antirez@gmail.com>
Wed, 7 Jul 2010 11:28:26 +0000 (13:28 +0200)
committerantirez <antirez@gmail.com>
Wed, 7 Jul 2010 11:28:26 +0000 (13:28 +0200)
Makefile
linenoise.c

index 09478c3689403be588a9258cea5cd7d1ab080394..5d1705764ef6a02b28ecf9bf4c499fe49b6cd198 100644 (file)
--- a/Makefile
+++ b/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
index 6aabe1765922a00945147bf29c926b2496d7a019..8f9c24a379092eb9ae126c96a4c09bb5e3ff4b2c 100644 (file)
@@ -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));