1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

windows: Indentation (cosmetics only).

This commit is contained in:
Aurelien Jacobs 2014-09-24 12:47:58 +02:00
parent 7aeb6736bd
commit 6c444ade55

View File

@ -499,21 +499,21 @@ SP_PRIV enum sp_return list_ports(struct sp_port ***list)
NULL, &type, (LPBYTE)data, &data_size) == ERROR_SUCCESS) NULL, &type, (LPBYTE)data, &data_size) == ERROR_SUCCESS)
{ {
if (type == REG_SZ) { if (type == REG_SZ) {
data_len = data_size / sizeof(TCHAR); data_len = data_size / sizeof(TCHAR);
data[data_len] = '\0'; data[data_len] = '\0';
#ifdef UNICODE #ifdef UNICODE
name_len = WideCharToMultiByte(CP_ACP, 0, data, -1, NULL, 0, NULL, NULL); name_len = WideCharToMultiByte(CP_ACP, 0, data, -1, NULL, 0, NULL, NULL);
#else #else
name_len = data_len + 1; name_len = data_len + 1;
#endif #endif
if (!(name = malloc(name_len))) { if (!(name = malloc(name_len))) {
SET_ERROR(ret, SP_ERR_MEM, "registry port name malloc failed"); SET_ERROR(ret, SP_ERR_MEM, "registry port name malloc failed");
goto out; goto out;
} }
#ifdef UNICODE #ifdef UNICODE
WideCharToMultiByte(CP_ACP, 0, data, -1, name, name_len, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, data, -1, name, name_len, NULL, NULL);
#else #else
strcpy(name, data); strcpy(name, data);
#endif #endif
DEBUG_FMT("Found port %s", name); DEBUG_FMT("Found port %s", name);
if (!(*list = list_append(*list, name))) { if (!(*list = list_append(*list, name))) {