Changeset 61f8d668 in rtems
- Timestamp:
- 11/19/14 20:26:11 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 0ad1e80
- Parents:
- ba3b6fd
- git-author:
- Josh Oguin <josh.oguin@…> (11/19/14 20:26:11)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (11/26/14 13:51:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/shared/bspinit.c
rba3b6fd r61f8d668 38 38 int result = -124; 39 39 40 if (boot_cmdline) 41 { 40 if (boot_cmdline) { 42 41 cmdline = malloc (strlen (boot_cmdline) + 1); 43 42 44 if (cmdline) 45 { 43 if (cmdline) { 46 44 strcpy (cmdline, boot_cmdline); 47 45 … … 51 49 * Break the line up into arguments with "" being ignored. 52 50 */ 53 while (true) 54 { 51 while (true) { 55 52 command = strtok (command, " \t\r\n"); 56 53 if (command == NULL) … … 60 57 } 61 58 59 /* 60 * If there are arguments, allocate enough memory for the argv 61 * array to be passed into main(). 62 * 63 * NOTE: If argc is 0, then argv will be NULL. 64 */ 62 65 argv = calloc (argc, sizeof (char*)); 63 66 64 if (argv) 65 { 67 if (argv) { 66 68 int a; 67 69 … … 69 71 argv[0] = command; 70 72 71 for (a = 1; a < argc; a++) 72 { 73 for (a = 1; a < argc; a++) { 73 74 command += strlen (command) + 1; 74 75 argv[a] = command; 75 76 } 76 } 77 else 77 } else 78 78 argc = 0; 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.