On Wed, 30.01.13 11:07, Vasily Kulikov (seg...@openwall.com) wrote: > Hi, > > systemd uses plain NULL as an argument of variadic functions, which is a > UB in C. (char*)NULL should be used instead. Plain NULL may be defined > as "0" or smth. > > >From C99: > > "6.3.2.3 Pointers > > ... > > 3 > An integer constant expression with the value 0, or such an expression > cast to type void *, is called a null pointer constant. > > ... > > 7.17 Common definitions <stddef.h> > > ... > > 3 > The macros are NULL which expands to an implementation-defined null > pointer constant;" > > NULL is wrongly used e.g. in sd_journal_send() in > src/journal/test-journal-send.c.
We actually care about readability of the sources and non-Linux systems are out-of-focus for us. Can you tell me which Linux system has sizeof(void*) != sizeof(char*)? Otherwise, I only see this as pointless excercise of making our sources less readable... Or am I missing something here? Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel