[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 2/3] stdlibc: strftime erlaubt keine NULL-Pointer



- time.c: wenn datestr NULL ist macht das alles keinen Sinn. Da hilft
  auch keine Extraportion Unsinn.

Reported-by: Clang 3.0
Signed-off-by: Andreas Freimuth <m.nemo@xxxxxxx>
---
 src/modules/lib/stdlibc/time.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/modules/lib/stdlibc/time.c b/src/modules/lib/stdlibc/time.c
index b05933b..04b4b5e 100644
--- a/src/modules/lib/stdlibc/time.c
+++ b/src/modules/lib/stdlibc/time.c
@@ -251,11 +251,6 @@ size_t strftime(char *str, size_t maxs, const char* datestr,
 
     char dflcase[] = "%?";
 
-    // TODO: Aktuelle Zeit ermitteln
-    if (datestr == NULL) {
-        nstr = "";
-    }
-
     // Datumsformatstring parsen
     while ((c = *datestr++) != '\0') {
         if (c != '%') {
-- 
1.7.11.7