Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes in / [22e6802:65c1778] in mainline


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/syscall/syscall.c

    r22e6802 r65c1778  
    6262
    6363#ifdef CONFIG_UDEBUG
    64         bool debug;
    65 
    6664        /*
    6765         * Early check for undebugged tasks. We do not lock anything as this
    68          * test need not be precise in either way.
     66         * test need not be precise in either direction.
    6967         */
    70         debug = THREAD->udebug.active;
    71        
    72         if (debug) {
     68        if (THREAD->udebug.active) {
    7369                udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
    7470        }
     
    8783       
    8884#ifdef CONFIG_UDEBUG
    89         if (debug) {
     85        if (THREAD->udebug.active) {
    9086                udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
    9187       
  • uspace/lib/libc/generic/io/io.c

    r22e6802 r65c1778  
    341341size_t fread(void *buf, size_t size, size_t nmemb, FILE *stream)
    342342{
    343         size_t left = size * nmemb;
    344         size_t done = 0;
    345        
     343        size_t left, done;
     344
     345        if (size == 0 || nmemb == 0)
     346                return 0;
     347
    346348        /* Make sure no data is pending write. */
    347349        _fflushbuf(stream);
     350
     351        left = size * nmemb;
     352        done = 0;
    348353       
    349354        while ((left > 0) && (!stream->error) && (!stream->eof)) {
     
    365370static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
    366371{
    367         size_t left = size * nmemb;
    368         size_t done = 0;
    369        
     372        size_t left;
     373        size_t done;
     374
     375        if (size == 0 || nmemb == 0)
     376                return 0;
     377
     378        left = size * nmemb;
     379        done = 0;
     380
    370381        while ((left > 0) && (!stream->error)) {
    371382                ssize_t wr;
     
    421432        uint8_t b;
    422433        bool need_flush;
    423        
     434
     435        if (size == 0 || nmemb == 0)
     436                return 0;
     437
    424438        /* If not buffered stream, write out directly. */
    425439        if (stream->btype == _IONBF) {
Note: See TracChangeset for help on using the changeset viewer.