[PATCH] Use strchr() to search for a single character

Поиск
Список
Период
Сортировка
От Dmitry Mityugov
Тема [PATCH] Use strchr() to search for a single character
Дата
Msg-id 9c1beea6c7a5e9fb6677f26620f1f257@postgrespro.ru
обсуждение исходный текст
Ответы Re: [PATCH] Use strchr() to search for a single character
Список pgsql-hackers
Code in src/port/pgmkdirp.c uses strstr() to find a single character in 
a string, but strstr() seems to be too generic for this job. Another 
function, strchr(), might be better suited for this purpose, because it 
is optimized to search for exactly one character in a string. In 
addition, if strchr() is used, the compiler doesn't have to generate a 
terminating \0 byte for the substring, producing slightly smaller code. 
I'm attaching the patch.

Regards,
Dmitry
Вложения

В списке pgsql-hackers по дате отправления: