remove obsolete NULL casts

Поиск
Список
Период
Сортировка
От Neil Conway
Тема remove obsolete NULL casts
Дата
Msg-id 87u13ankub.fsf@mailbox.samurai.com
обсуждение исходный текст
Ответы Re: remove obsolete NULL casts  (Kurt Roeckx <Q@ping.be>)
Список pgsql-patches
In any modern dialect of C, casting the "NULL" pointer literal to a
specific pointer type is unnecessary. For example:

    char *foo;
    foo = malloc(...);
    if (foo == (char *) NULL) {...}

The cast on the 3rd line serves no useful purpose. Hence, this patch
removes all such instances of NULL-pointer casting from the
backend. I've attached it in gzip'ed format, as it is 145KB
uncompressed.

Unless anyone objects, I intend to apply this within 48 hours.

-Neil

Вложения

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: add more exprs to CREATE SCHEMA
Следующее
От: Neil Conway
Дата:
Сообщение: minor smgr code cleanup