| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-09 20:03:33 +0100 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-09 20:03:33 +0100 | 
| commit | 7af295b2ec22f06b24079bf895ac97079f64b6d7 (patch) | |
| tree | 84a554fc2c169956e3ee975152332c39f6c3615a /src/storage/storage.c | |
| parent | 9ca43c73ba29d6b42cd771f1567074418c883c3e (diff) | |
It's starting to "properly" reply...
The ACSL coverage is far behind though.
Diffstat (limited to 'src/storage/storage.c')
| -rw-r--r-- | src/storage/storage.c | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/src/storage/storage.c b/src/storage/storage.c index 22c5c49..40185a3 100644 --- a/src/storage/storage.c +++ b/src/storage/storage.c @@ -6,7 +6,7 @@  #include <stdint.h> /* defines SIZE_MAX */  #include <stdio.h> -#include "../pipe/pipe.h" +#include "../error/error.h"  #include "storage.h" @@ -15,12 +15,17 @@ int ZoO_storage_write_line     const char filename [const restrict static 1],     char line [const restrict static 1],     size_t const line_size, -   const struct ZoO_pipe io [const restrict static 1] +   FILE io [const restrict static 1]  )  {     const int old_errno = errno;     FILE * file; +   if (filename == (const char *) NULL) +   { +      return 0; +   } +     file = fopen(filename, "a");     if (file == (FILE *) NULL) @@ -53,8 +58,7 @@ int ZoO_storage_write_line        ZoO_ERROR        (           io, -         "Could not store line '%s' in %s.", -         line, +         "Could not store line in storage file %s.",           filename        );  | 


