Skip to content

Commit

Permalink
netcam.c: tfile_context(): simplify function
Browse files Browse the repository at this point in the history
This function always returned `ret`, so might as well take a shortcut
and return the pointer directly.
  • Loading branch information
aklomp committed Oct 15, 2014
1 parent f7e0830 commit 8f5bf18
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions netcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,14 +1843,8 @@ static int netcam_read_file_jpeg(netcam_context_ptr netcam)

tfile_context *file_new_context(void)
{
tfile_context *ret;

/* Note that mymalloc will exit on any problem. */
ret = mymalloc(sizeof(tfile_context));
if (!ret)
return ret;

return ret;
return mymalloc(sizeof(tfile_context));
}

void file_free_context(tfile_context* ctxt)
Expand Down

0 comments on commit 8f5bf18

Please sign in to comment.