mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
Don't compare with a literal
Don't compare a pointer with a string literal. Use strcmp instead.
This commit is contained in:
parent
b715a9637d
commit
afb0fb4f7b
1 changed files with 4 additions and 2 deletions
|
|
@ -71,9 +71,11 @@ int which_cfgfile(char ** const cfgfile)
|
|||
filename_without_tilde[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
||||
subst_tilde_in_filename(filename_without_tilde);
|
||||
if ((inputFile = fopen(filename_without_tilde, "r")) == NULL) {
|
||||
if ((*cfgfile != DEFAULT_PROFILERC) && (*cfgfile != SYS_PROFILERC)) {
|
||||
if (strcmp(*cfgfile, DEFAULT_PROFILERC) &&
|
||||
strcmp(*cfgfile, SYS_PROFILERC)) {
|
||||
res = -ENOENT;
|
||||
} else if ((*cfgfile == DEFAULT_PROFILERC) && ((inputFile = fopen(SYS_PROFILERC, "r")) == NULL)) {
|
||||
} else if (!strcmp(*cfgfile, DEFAULT_PROFILERC) &&
|
||||
(inputFile = fopen(SYS_PROFILERC, "r")) == NULL) {
|
||||
res = -ENOENT;
|
||||
} else {
|
||||
fclose(inputFile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue