whitespace fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4712 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
0f7891293f
commit
89d5bcf4d5
|
@ -41,7 +41,6 @@ int _sc_add_reader(sc_context_t *ctx, sc_reader_t *reader)
|
||||||
assert(reader != NULL);
|
assert(reader != NULL);
|
||||||
reader->ctx = ctx;
|
reader->ctx = ctx;
|
||||||
list_append(&ctx->readers, reader);
|
list_append(&ctx->readers, reader);
|
||||||
|
|
||||||
return SC_SUCCESS;
|
return SC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,32 +477,28 @@ static void process_config_file(sc_context_t *ctx, struct _sc_ctx_options *opts)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
conf_path = getenv("OPENSC_CONF");
|
conf_path = getenv("OPENSC_CONF");
|
||||||
if (!conf_path) {
|
if (!conf_path) {
|
||||||
rc = RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\OpenSC",
|
rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey);
|
||||||
0, KEY_QUERY_VALUE, &hKey );
|
if (rc == ERROR_SUCCESS) {
|
||||||
if( rc == ERROR_SUCCESS ) {
|
|
||||||
temp_len = PATH_MAX;
|
temp_len = PATH_MAX;
|
||||||
rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL,
|
rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL, (LPBYTE) temp_path, &temp_len);
|
||||||
(LPBYTE) temp_path, &temp_len);
|
if ((rc == ERROR_SUCCESS) && (temp_len < PATH_MAX))
|
||||||
if( (rc == ERROR_SUCCESS) && (temp_len < PATH_MAX) )
|
|
||||||
conf_path = temp_path;
|
conf_path = temp_path;
|
||||||
RegCloseKey( hKey );
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! conf_path) {
|
if (!conf_path) {
|
||||||
rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\OpenSC",
|
rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey );
|
||||||
0, KEY_QUERY_VALUE, &hKey );
|
if (rc == ERROR_SUCCESS) {
|
||||||
if( rc == ERROR_SUCCESS ) {
|
|
||||||
temp_len = PATH_MAX;
|
temp_len = PATH_MAX;
|
||||||
rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL,
|
rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL, (LPBYTE) temp_path, &temp_len);
|
||||||
(LPBYTE) temp_path, &temp_len);
|
if ((rc == ERROR_SUCCESS) && (temp_len < PATH_MAX))
|
||||||
if( (rc == ERROR_SUCCESS) && (temp_len < PATH_MAX) )
|
|
||||||
conf_path = temp_path;
|
conf_path = temp_path;
|
||||||
RegCloseKey( hKey );
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! conf_path) {
|
if (!conf_path) {
|
||||||
sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "process_config_file doesn't find opensc config file. Please set the registry key.");
|
sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "process_config_file doesn't find opensc config file. Please set the registry key.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue