Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: vpd.c

Issue 6728023: fix the crash bug when specifying non-existed option. (Closed) Base URL: ssh://gitrw.chromium.org:9222/vpd.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. 2 * Copyright (C) 2010 Google Inc.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2 6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version. 7 * of the License, or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 const char *optstring = "hf:E:s:p:i:lO"; 558 const char *optstring = "hf:E:s:p:i:lO";
559 static struct option long_options[] = { 559 static struct option long_options[] = {
560 {"help", 0, 0, 'h'}, 560 {"help", 0, 0, 'h'},
561 {"file", 0, 0, 'f'}, 561 {"file", 0, 0, 'f'},
562 {"epsbase", 0, 0, 'E'}, 562 {"epsbase", 0, 0, 'E'},
563 {"string", 0, 0, 's'}, 563 {"string", 0, 0, 's'},
564 {"pad", 0, 0, 'p'}, 564 {"pad", 0, 0, 'p'},
565 {"partition", 0, 0, 'i'}, 565 {"partition", 0, 0, 'i'},
566 {"list", 0, 0, 'l'}, 566 {"list", 0, 0, 'l'},
567 {"overwrite", 0, 0, 'O'}, 567 {"overwrite", 0, 0, 'O'},
568 {0, 0, 0, 0}
568 }; 569 };
569 char *filename = NULL; 570 char *filename = NULL;
570 int write_back_to_flash = 0; 571 int write_back_to_flash = 0;
571 int list_it = 0; 572 int list_it = 0;
572 int overwrite_it = 0; 573 int overwrite_it = 0;
573 int modified = 0; 574 int modified = 0;
574 int fd; 575 int fd;
575 576
576 initContainer(&file); 577 initContainer(&file);
577 initContainer(&argument); 578 initContainer(&argument);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } 714 }
714 715
715 teardown: 716 teardown:
716 if (spd_data) free(spd_data); 717 if (spd_data) free(spd_data);
717 if (filename) free(filename); 718 if (filename) free(filename);
718 destroyContainer(&file); 719 destroyContainer(&file);
719 destroyContainer(&argument); 720 destroyContainer(&argument);
720 721
721 return retval; 722 return retval;
722 } 723 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698