Markus Elfring

Results 791 issues of Markus Elfring

[An extra null pointer check is not needed in functions](http://dietmar-kuehl.de/mirror/c++-faq/freestore-mgmt.html#faq-16.8) like the following. - [Process_State::init](https://github.com/BinaryAnalysisPlatform/qira/blob/88e714e1dd526539255e5992ec166ca6e6d7d8c3/pin/qirapin.cpp#L363) - [Trace_dealloc](https://github.com/BinaryAnalysisPlatform/qira/blob/ccb1c834c6229643ecbff40cf640170688a7681c/qiradb/qiradb/_qiradb.cpp#L26)

I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing. Would you like to add more error...

[An extra null pointer check is not needed](http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html) in functions like the following. - [BitmapDIB::Release](https://github.com/skywind3000/pixellib/blob/286f3c5fef485418cb60d3d260983dd13e766dd1/wrap/PixelWin32.cpp#L179) - [x11_quit](https://github.com/skywind3000/pixellib/blob/286f3c5fef485418cb60d3d260983dd13e766dd1/pixellib/ikitwin.c#L698) - [x11_release_mode](https://github.com/skywind3000/pixellib/blob/286f3c5fef485418cb60d3d260983dd13e766dd1/pixellib/ikitwin.c#L656)

I would like to point out that identifiers like "[`__IBMBITS_H__`](https://github.com/skywind3000/pixellib/blob/286f3c5fef485418cb60d3d260983dd13e766dd1/pixellib/ibmbits.h#L30)" and "[`__NPIXEL_H__`](https://github.com/skywind3000/pixellib/blob/f86642f1a6f42bd1b8293a86ebf30e1a78ce06e7/pixellib/npixel.h#L10)" [do not fit](https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier#DCL37-C.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29) to the expected naming convention of the C language standard. Would you like to adjust...

Would you like to [add more error handling](https://github.com/romanbsd/statsd-c-client/blob/611ae909f76dfd3adcbfc58fef3936296d50319c/uptimed.c#L85 "Update candidate: main()") for return values from functions like “[statsd_init_with_namespace](https://github.com/romanbsd/statsd-c-client/blob/0bfa3d59e29ad7eff332c9e2506a23d311ff8db4/statsd-client.c#L15 "Software initialisation")”?

[An extra null pointer check is not needed](https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first "Free a null pointer anyway or check first?") in [a function like “statsd_finalize”](https://github.com/romanbsd/statsd-c-client/blob/0bfa3d59e29ad7eff332c9e2506a23d311ff8db4/statsd-client.c#L82 "Update candidate: statsd_finalize()").

I would like to point out that an identifier like “[`_H_STATSD_CLIENT`](https://github.com/romanbsd/statsd-c-client/blob/0bfa3d59e29ad7eff332c9e2506a23d311ff8db4/statsd-client.h#L1 "Update candidate")” [does eventually not fit](https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier#DCL37-C.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28IncludeGuard%29 "Do not use identifiers which are reserved for the compiler implementation.") to the...

The functions "[printf](http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html)" and "[exit](http://pubs.opengroup.org/onlinepubs/9699919799/functions/exit.html)" do not belong to the list of [async-signal-safe functions](https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers). I guess that a different program design will be needed for your function "[handle_term](https://github.com/jenssegers/RTL8188-hostapd/blob/783ec4b69be4baadaee0b5134740645dd307383e/hostapd/hlr_auc_gw.c#L637)".

I suggest to reuse a higher level build system than [your current make script](https://github.com/xaizek/zograscope/blob/1cdfea6c44963b9b9f0a7aecd0c6e67a03ffded5/Makefile#L1 "Update candidate") so that powerful checks for software features will become easier. - [CMake](https://cmake.org/ "Building software...

Would you like to add more error handling for return values from functions like the following? - [pthread_create](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_create.html "Thread creation") ⇒ [msk_connect](https://github.com/martinetd/mooshika/blob/503a4e3cb5ca63474cc85710dc3435c0c1e6c83e/src/trans_shm.c#L588) - [pthread_mutex_lock](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html "Lock a mutex") ⇒ [msk_check_create_epoll_thread](https://github.com/martinetd/mooshika/blob/188439e9a6e46f551516915a90c52abed80bd296/src/trans_rdma.c#L390)