Changeset: d3a14e8e9f89 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3a14e8e9f89
Modified Files:
        monetdb5/mal/mal_readline.c
Branch: Jan2014
Log Message:

Cosmetic changes.


diffs (58 lines):

diff --git a/monetdb5/mal/mal_readline.c b/monetdb5/mal/mal_readline.c
--- a/monetdb5/mal/mal_readline.c
+++ b/monetdb5/mal/mal_readline.c
@@ -334,8 +334,8 @@ getConsoleInput(Client c, const char *pr
                                length = strlen(buf);
                                buf = realloc(buf, length + 2);
                                if( buf == NULL){
-                                       
GDKerror("getConsoleInput"MAL_MALLOC_FAIL);
-                                       return buf;
+                                       GDKerror("getConsoleInput: " 
MAL_MALLOC_FAIL);
+                                       return NULL;
                                }
                                buf[length++] = '\n';
                                buf[length] = 0;
@@ -350,12 +350,13 @@ getConsoleInput(Client c, const char *pr
                                fflush(stdout);
                        }
 #endif
-                       if (buf == NULL)
+                       if (buf == NULL) {
                                buf= malloc(BUFSIZ);
                                if( buf == NULL){
-                                       
GDKerror("getConsoleInput"MAL_MALLOC_FAIL);
-                                       return buf;
+                                       GDKerror("getConsoleInput: " 
MAL_MALLOC_FAIL);
+                                       return NULL;
                                }
+                       }
                        line = fgets(buf, BUFSIZ, stdin);
                }
 
@@ -363,7 +364,7 @@ getConsoleInput(Client c, const char *pr
                        /* end of file */
                        if (buf)
                                free(buf);
-                       return 0;
+                       return NULL;
                } else
                        length = strlen(line);
 
@@ -385,7 +386,7 @@ getConsoleInput(Client c, const char *pr
                                switch (line[1]) {
                                case 'q':
                                        free(buf);
-                                       return 0;
+                                       return NULL;
                                default:
                                        break;
                                }
@@ -485,7 +486,7 @@ readConsole(Client cntxt)
                        /* extremly dirty inplace buffer overwriting */
                        cntxt->fdin->buf= realloc(cntxt->fdin->buf, len+1);
                        if( cntxt->fdin->buf == NULL) {
-                               GDKerror("readConsole" MAL_MALLOC_FAIL);
+                               GDKerror("readConsole: " MAL_MALLOC_FAIL);
                                free(buf);
                                goto bailout;
                        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to