Fossil SCM

Use signed char for two json timeline functions that may return -1.

preben 2023-11-28 19:31 signed-chars
Commit c42dee8634ba9961c4d03a9f43989a4a433831e1a22bcf34b9af279c08b98480
1 file changed +3 -3
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -143,12 +143,12 @@
143143
** property is set to the tag/branch name found in the request.
144144
**
145145
** Only one of "tag" or "branch" modes will work at a time, and if
146146
** both are specified, which one takes precedence is unspecified.
147147
*/
148
-static char json_timeline_add_tag_branch_clause(Blob *pSql,
149
- cson_object * pPayload){
148
+static signed char json_timeline_add_tag_branch_clause(Blob *pSql,
149
+ cson_object * pPayload){
150150
char const * zTag = NULL;
151151
char const * zBranch = NULL;
152152
char const * zMiOnly = NULL;
153153
char const * zUnhide = NULL;
154154
int tagid = 0;
@@ -220,11 +220,11 @@
220220
** applies one of them.
221221
**
222222
** Returns -1 if it adds a "before" clause, 1 if it adds
223223
** an "after" clause, and 0 if adds only an order-by clause.
224224
*/
225
-static char json_timeline_add_time_clause(Blob *pSql){
225
+static signed char json_timeline_add_time_clause(Blob *pSql){
226226
char const * zAfter = NULL;
227227
char const * zBefore = NULL;
228228
int rc = 0;
229229
zAfter = json_find_option_cstr("after",NULL,"a");
230230
zBefore = zAfter ? NULL : json_find_option_cstr("before",NULL,"b");
231231
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -143,12 +143,12 @@
143 ** property is set to the tag/branch name found in the request.
144 **
145 ** Only one of "tag" or "branch" modes will work at a time, and if
146 ** both are specified, which one takes precedence is unspecified.
147 */
148 static char json_timeline_add_tag_branch_clause(Blob *pSql,
149 cson_object * pPayload){
150 char const * zTag = NULL;
151 char const * zBranch = NULL;
152 char const * zMiOnly = NULL;
153 char const * zUnhide = NULL;
154 int tagid = 0;
@@ -220,11 +220,11 @@
220 ** applies one of them.
221 **
222 ** Returns -1 if it adds a "before" clause, 1 if it adds
223 ** an "after" clause, and 0 if adds only an order-by clause.
224 */
225 static char json_timeline_add_time_clause(Blob *pSql){
226 char const * zAfter = NULL;
227 char const * zBefore = NULL;
228 int rc = 0;
229 zAfter = json_find_option_cstr("after",NULL,"a");
230 zBefore = zAfter ? NULL : json_find_option_cstr("before",NULL,"b");
231
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -143,12 +143,12 @@
143 ** property is set to the tag/branch name found in the request.
144 **
145 ** Only one of "tag" or "branch" modes will work at a time, and if
146 ** both are specified, which one takes precedence is unspecified.
147 */
148 static signed char json_timeline_add_tag_branch_clause(Blob *pSql,
149 cson_object * pPayload){
150 char const * zTag = NULL;
151 char const * zBranch = NULL;
152 char const * zMiOnly = NULL;
153 char const * zUnhide = NULL;
154 int tagid = 0;
@@ -220,11 +220,11 @@
220 ** applies one of them.
221 **
222 ** Returns -1 if it adds a "before" clause, 1 if it adds
223 ** an "after" clause, and 0 if adds only an order-by clause.
224 */
225 static signed char json_timeline_add_time_clause(Blob *pSql){
226 char const * zAfter = NULL;
227 char const * zBefore = NULL;
228 int rc = 0;
229 zAfter = json_find_option_cstr("after",NULL,"a");
230 zBefore = zAfter ? NULL : json_find_option_cstr("before",NULL,"b");
231

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button