Changeset 2322
- Timestamp:
- Jan 18, 2019, 4:18:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cron2/trunk/src/cron2.c ¶
r2321 r2322 835 835 PROCESS *theProc; 836 836 837 if((theProc = (PROCESS *) malloc(sizeof(PROCESS))) == NULL)837 if((theProc = (PROCESS *)calloc(1,sizeof(PROCESS))) == NULL) 838 838 { 839 839 log("Memory allocation failure in parse_line()\n"); … … 847 847 848 848 x = 0; 849 token = strtok(line," "); 849 token = strtok(line," \t"); 850 851 // check for empty line 852 if (token == NULL) { 853 printf("ERROR: invalid characters in line %d of CRON2.DAT\n",ln); 854 log("ERROR: invalid characters in line %d of CRON2.DAT\n",ln); 855 c2errno = BAD_CRON2_ENTRY; 856 free(theProc->origline); 857 free(theProc); 858 return(NULL); 859 } 850 860 851 861 while(token) … … 1635 1645 } 1636 1646 1637 token = strtok(NULL," ");1647 token = strtok(NULL," \t"); 1638 1648 } 1639 1649
Note:
See TracChangeset
for help on using the changeset viewer.