On Wednesday 2013-01-30 08:07, Vasily Kulikov wrote: >Hi, > >systemd uses plain NULL as an argument of variadic functions, which is a >UB in C.
The mere use of NULL in variadic functions is not UB. If anything, calling va_arg(argp, char *) for something that is actually not a char * might, though. > (char*)NULL should be used instead. Plain NULL may be defined >as "0" or smth. It's ugly, and almost everybody expects, and is programming that way, that sizeof(char *) == sizeof(void *) and that C is forgiving the apparent type-mismatch. So far, it has worked. >NULL is wrongly used e.g. in sd_journal_send() in >src/journal/test-journal-send.c. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
