Skip to content

Commit

Permalink
Fix warnings in anacron and crond code.
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed Mar 15, 2019
1 parent a657676 commit c89d582
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion anacron/runjob.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ xputenv(const char *s)
{
char *name = NULL, *val = NULL;
char *eq_ptr;
const char *errmsg;
size_t eq_index;

if (s == NULL) {
Expand Down
4 changes: 2 additions & 2 deletions src/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ void check_inotify_database(cron_db * old_db) {
if (not_a_crontab(dp))
continue;

strncpy(fname, dp->d_name, NAME_MAX);
strncpy(fname, dp->d_name, NAME_MAX + 1);

if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR,
dp->d_name, '/'))
Expand Down Expand Up @@ -566,7 +566,7 @@ int load_database(cron_db * old_db) {
if (not_a_crontab(dp))
continue;

strncpy(fname, dp->d_name, NAME_MAX);
strncpy(fname, dp->d_name, NAME_MAX + 1);

if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR, fname, '/'))
continue; /* XXX log? */
Expand Down

0 comments on commit c89d582

Please sign in to comment.