Changeset: 0f0bab893429 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f0bab893429 Modified Files: monetdb5/modules/mal/tablet.c monetdb5/modules/mal/tablet.h Branch: default Log Message:
Use const; don't do superfluous test. diffs (42 lines): diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -454,7 +454,7 @@ tablet_read_more(bstream *in, stream *ou if (bstream_next(in) < 0) return EOF; if (in->eof) { - if (out && mnstr_write(out, PROMPT2, sizeof(PROMPT2) - 1, 1) == 1) + if (mnstr_write(out, PROMPT2, sizeof(PROMPT2) - 1, 1) == 1) mnstr_flush(out); in->eof = 0; /* we need more query text */ @@ -691,7 +691,7 @@ typedef struct { MT_Sema reply; /* let reader continue */ Tablet *as; char *errbuf; - char *csep, *rsep; + const char *csep, *rsep; size_t seplen, rseplen; char quote; @@ -1632,7 +1632,7 @@ create_rejects_table(Client cntxt) } BUN -SQLload_file(Client cntxt, Tablet *as, bstream *b, stream *out, char *csep, char *rsep, char quote, lng skip, lng maxrow, int best) +SQLload_file(Client cntxt, Tablet *as, bstream *b, stream *out, const char *csep, const char *rsep, char quote, lng skip, lng maxrow, int best) { BUN cnt = 0, cntstart = 0, leftover = 0; int res = 0; /* < 0: error, > 0: success, == 0: continue processing */ diff --git a/monetdb5/modules/mal/tablet.h b/monetdb5/modules/mal/tablet.h --- a/monetdb5/modules/mal/tablet.h +++ b/monetdb5/modules/mal/tablet.h @@ -73,7 +73,7 @@ typedef struct Table_t { BAT *complaints; /* lines that did not match the required input */ } Tablet; -mal_export BUN SQLload_file(Client cntxt, Tablet *as, bstream *b, stream *out, char *csep, char *rsep, char quote, lng skip, lng maxrow, int best); +mal_export BUN SQLload_file(Client cntxt, Tablet *as, bstream *b, stream *out, const char *csep, const char *rsep, char quote, lng skip, lng maxrow, int best); mal_export str TABLETcreate_bats(Tablet *as, BUN est); mal_export str TABLETcollect(BAT **bats, Tablet *as); mal_export str TABLETcollect_parts(BAT **bats, Tablet *as, BUN offset); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list