mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
Fix "make cppcheck" warning.
This commit is contained in:
16
src/dorem.c
16
src/dorem.c
@@ -1372,26 +1372,26 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig const *tim, int dse, int is
|
|||||||
/* If it's a MSG-type reminder, and no -k option was used, issue the banner. */
|
/* If it's a MSG-type reminder, and no -k option was used, issue the banner. */
|
||||||
if ((t->typ == MSG_TYPE || t->typ == MSF_TYPE)
|
if ((t->typ == MSG_TYPE || t->typ == MSF_TYPE)
|
||||||
&& !DidMsgReminder && !NextMode && !msg_command && !is_queued) {
|
&& !DidMsgReminder && !NextMode && !msg_command && !is_queued) {
|
||||||
DynamicBuffer buf;
|
DynamicBuffer buf2;
|
||||||
DBufInit(&buf);
|
DBufInit(&buf2);
|
||||||
DidMsgReminder = 1;
|
DidMsgReminder = 1;
|
||||||
if (!DoSubstFromString(DBufValue(&Banner), &buf,
|
if (!DoSubstFromString(DBufValue(&Banner), &buf2,
|
||||||
DSEToday, NO_TIME) &&
|
DSEToday, NO_TIME) &&
|
||||||
DBufLen(&buf)) {
|
DBufLen(&buf2)) {
|
||||||
if (!JSONMode) {
|
if (!JSONMode) {
|
||||||
printf("%s\n", DBufValue(&buf));
|
printf("%s\n", DBufValue(&buf2));
|
||||||
} else {
|
} else {
|
||||||
if (JSONLinesEmitted) {
|
if (JSONLinesEmitted) {
|
||||||
printf("},\n");
|
printf("},\n");
|
||||||
}
|
}
|
||||||
JSONLinesEmitted++;
|
JSONLinesEmitted++;
|
||||||
printf("{\"banner\":\"");
|
printf("{\"banner\":\"");
|
||||||
remove_trailing_newlines(&buf);
|
remove_trailing_newlines(&buf2);
|
||||||
PrintJSONString(DBufValue(&buf));
|
PrintJSONString(DBufValue(&buf2));
|
||||||
printf("\"");
|
printf("\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBufFree(&buf);
|
DBufFree(&buf2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If it's NextMode, process as a ADVANCE_MODE-type entry, and issue
|
/* If it's NextMode, process as a ADVANCE_MODE-type entry, and issue
|
||||||
|
|||||||
Reference in New Issue
Block a user