Avoiding use of function parameter name "class"

This commit is contained in:
Thomas Schmitt 2009-01-10 15:40:45 +00:00
parent db8818b303
commit b0ef1ae4e4
3 changed files with 12 additions and 8 deletions

View File

@ -6147,7 +6147,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
for(s= xorriso->drive_greylist; s != NULL; s= Xorriso_lst_get_next(s, 0)) {
sprintf(line, "-drive_class 'risky' %s\n",
sprintf(line, "-drive_class 'caution' %s\n",
Text_shellsafe(Xorriso_lst_get_text(s, 0), sfe, 0));
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
@ -12316,20 +12316,20 @@ int Xorriso_option_disk_pattern(struct XorrisO *xorriso, char *mode, int flag)
/* Option -drive_class */
int Xorriso_option_drive_class(struct XorrisO *xorriso,
char *class, char *pattern, int flag)
char *d_class, char *pattern, int flag)
{
int ret= 1;
if(strcmp(class, "banned") == 0) {
if(strcmp(d_class, "banned") == 0) {
ret= Xorriso_lst_new(&(xorriso->drive_blacklist), pattern,
xorriso->drive_blacklist, 1);
} else if(strcmp(class, "caution") == 0) {
} else if(strcmp(d_class, "caution") == 0) {
ret= Xorriso_lst_new(&(xorriso->drive_greylist), pattern,
xorriso->drive_greylist, 1);
} else if (strcmp(class, "harmless") == 0) {
} else if (strcmp(d_class, "harmless") == 0) {
ret= Xorriso_lst_new(&(xorriso->drive_whitelist), pattern,
xorriso->drive_whitelist, 1);
} else if (strcmp(class, "clear_list") == 0) {
} else if (strcmp(d_class, "clear_list") == 0) {
if(strcmp(pattern, "banned") == 0)
Xorriso_lst_destroy_all(&(xorriso->drive_blacklist), 0);
else if(strcmp(pattern, "caution") == 0)
@ -12348,7 +12348,7 @@ int Xorriso_option_drive_class(struct XorrisO *xorriso,
}
ret= 1;
} else {
sprintf(xorriso->info_text, "-drive_class: unknown class '%s'", class);
sprintf(xorriso->info_text, "-drive_class: unknown class '%s'", d_class);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}

View File

@ -409,6 +409,10 @@ int Xorriso_option_dialog(struct XorrisO *xorriso, char *mode, int flag);
/* Option -disk_pattern "on"|"ls"|"off" */
int Xorriso_option_disk_pattern(struct XorrisO *xorriso, char *mode, int flag);
/* Option -drive_class */
int Xorriso_option_drive_class(struct XorrisO *xorriso,
char *d_class, char *pattern, int flag);
/* Option -dummy "on"|"off" */
int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.01.06.123047"
#define Xorriso_timestamP "2009.01.10.154018"