Skip to content

Commit

Permalink
JobDbRecord: added struct initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Jul 11, 2018
1 parent 3d5691d commit c74b890
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 45 additions & 0 deletions core/src/cats/cats.h
Expand Up @@ -136,6 +136,51 @@ struct JobDbRecord {
int offset; /**< offset records to display */
faddr_t rec_addr;
uint32_t FileIndex; /**< added during Verify */

JobDbRecord() {
JobId = -1;
Job[0] = 0;
Name[0] = 0;
JobType = 0;
JobLevel = 0;
JobStatus= 0;
ClientId = 0;
PoolId = 0;
FileSetId = 0;
PriorJobId = 0;
SchedTime = 0;
StartTime = 0;
EndTime = 0;
RealEndTime = 0;
JobTDate = 0;
VolSessionId = 0;
VolSessionTime = 0;
JobFiles = 0;
JobErrors = 0;
JobMissingFiles = 0;
JobBytes = 0;
ReadBytes = 0;
JobSumTotalBytes = 0;
PurgedFiles = 0;
HasBase = 0;

FirstIndex = 0;
LastIndex = 0;
StartFile = 0;
EndFile = 0;
StartBlock = 0;
EndBlock = 0;

cSchedTime[0] = 0;
cStartTime[0] = 0;
cEndTime[0] = 0;
cRealEndTime[0] = 0;

limit = 0;
offset = 0;
rec_addr = 0;
FileIndex = 0;
}
};

/* Job Media information used to create the media records
Expand Down
2 changes: 1 addition & 1 deletion core/src/dird/ua_restore.cc
Expand Up @@ -495,7 +495,7 @@ static int UserSelectJobidsOrFiles(UaContext *ua, RestoreContext *rx)
/* Include current second if using current time */
utime_t now = time(NULL) + 1;
JobId_t JobId;
JobDbRecord jr = { (JobId_t)-1 };
JobDbRecord jr;
bool done = false;
int i, j;
const char *list[] = {
Expand Down

0 comments on commit c74b890

Please sign in to comment.