Minor optimization in DeviceServiceEntry when setting up

to share all drives. Removed the call to strlen() and use
the return value from _snprintf
This commit is contained in:
Nik Twerdochlib 2013-11-07 11:43:22 -05:00
parent e979dcf485
commit c35c2bdeb6
1 changed files with 1 additions and 2 deletions

View File

@ -795,8 +795,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
if (*dev > 'B')
{
/* Suppress disk drives A and B to avoid pesty messages */
_snprintf(buf, sizeof(buf) - 4, "%s", drive->Name);
len = strlen(buf);
len = _snprintf(buf, sizeof(buf) - 4, "%s", drive->Name);
buf[len] = '_';
buf[len + 1] = dev[0];
buf[len + 2] = 0;