mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed compiler warnings
SVN revision: 2474
This commit is contained in:
parent
da3530ae80
commit
8a3bac6fa0
11
src/elogd.c
11
src/elogd.c
@ -11368,7 +11368,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
strlcpy(str, strrchr(thumb_name, DIR_SEPARATOR) + 1, sizeof(str));
|
strlcpy(str, strrchr(thumb_name, DIR_SEPARATOR) + 1, sizeof(str));
|
||||||
else
|
else
|
||||||
strlcpy(str, thumb_name, sizeof(str));
|
strlcpy(str, thumb_name, sizeof(str));
|
||||||
strlcpy(thumb_name, str, sizeof(str));
|
strlcpy(thumb_name, str, sizeof(thumb_name));
|
||||||
if (thumb_status == 2)
|
if (thumb_status == 2)
|
||||||
strsubst(thumb_name, sizeof(thumb_name), "-0.png", "");
|
strsubst(thumb_name, sizeof(thumb_name), "-0.png", "");
|
||||||
|
|
||||||
@ -12460,9 +12460,10 @@ int delete_logbook(LOGBOOK * lbs, char *error)
|
|||||||
p1 = (char *) find_section(buf, lbs->name);
|
p1 = (char *) find_section(buf, lbs->name);
|
||||||
p2 = (char *) find_next_section(p1 + 1);
|
p2 = (char *) find_next_section(p1 + 1);
|
||||||
|
|
||||||
if (p2)
|
if (p2) {
|
||||||
strlcpy(p1, p2, strlen(p2) + 1);
|
i = strlen(p2)+1;
|
||||||
else
|
strlcpy(p1, p2, i);
|
||||||
|
} else
|
||||||
*p1 = 0;
|
*p1 = 0;
|
||||||
|
|
||||||
lseek(fh, 0, SEEK_SET);
|
lseek(fh, 0, SEEK_SET);
|
||||||
@ -12719,7 +12720,7 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
|
|||||||
/* if we outsourced the authentication, use external username */
|
/* if we outsourced the authentication, use external username */
|
||||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||||
if ( stristr(str, "Webserver")) {
|
if ( stristr(str, "Webserver")) {
|
||||||
strncpy(user, http_user, sizeof(user));
|
strlcpy(user, http_user, sizeof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do not allow HTML in user name */
|
/* do not allow HTML in user name */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user