Changeset 2202 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-cli.c
- Timestamp:
- May 13, 2009, 4:34:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-cli.c
r2190 r2202 1444 1444 /*@ ints ** */ 1445 1445 int opt = 0; 1446 char tmp[MAX_STR_LEN];1446 char *tmp = NULL; 1447 1447 int i = 0; 1448 1448 int len; … … 1467 1467 if (flag_set[optopt]) { 1468 1468 bad_switches = TRUE; 1469 sprintf(tmp, "Switch -%c previously defined as %s\n", opt,1469 (void) asprintf(&tmp, "Switch -%c previously defined as %s\n", opt, 1470 1470 flag_val[i]); 1471 1471 log_to_screen(tmp); 1472 paranoid_free(tmp); 1472 1473 } else { 1473 1474 flag_set[opt] = TRUE; … … 1483 1484 if (strchr(flag_val[opt], '/') 1484 1485 && flag_val[opt][0] != '/') { 1485 sprintf(tmp,1486 (void)asprintf(&tmp, 1486 1487 "-%c flag --- must be absolute path --- '%s' isn't absolute", 1487 1488 opt, flag_val[opt]); 1488 1489 log_to_screen(tmp); 1490 paranoid_free(tmp); 1489 1491 bad_switches = TRUE; 1490 1492 } … … 1497 1499 for (i = optind; i < argc; i++) { 1498 1500 bad_switches = TRUE; 1499 sprintf(tmp, "Invalid arg -- %s\n", argv[i]);1501 (void)asprintf(&tmp, "Invalid arg -- %s\n", argv[i]); 1500 1502 log_to_screen(tmp); 1503 paranoid_free(tmp); 1501 1504 } 1502 1505 return (bad_switches);
Note:
See TracChangeset
for help on using the changeset viewer.