Remove 'puts' lines

This commit is contained in:
twinaphex 2019-09-19 04:19:18 +02:00
parent f4c6b06b49
commit 15470596ad
5 changed files with 4 additions and 45 deletions

View file

@ -851,13 +851,9 @@ char *path_resolve_realpath(char *buf, size_t size, bool resolve_symlinks)
t++;
}
else if (next - p == 1 && p[0] == '.')
{
p += 2;
}
else if (next - p == 0)
{
p += 1;
}
else
{
/* fail when truncating */

View file

@ -92,10 +92,7 @@ static void nbio_begin_op(struct nbio_linux_t* handle, uint16_t op)
handle->cb.aio_nbytes = handle->len;
if (io_submit(handle->ctx, 1, &cbp) != 1)
{
puts("ERROR - io_submit() failed");
abort();
}
handle->busy = true;
}
@ -160,21 +157,16 @@ static void nbio_linux_resize(void *data, size_t len)
if (!handle)
return;
/* This works perfectly fine if this check is removed, but it
* won't work on other nbio implementations */
/* therefore, it's blocked so nobody accidentally relies on it */
if (len < handle->len)
{
/* this works perfectly fine if this check is removed, but it
* won't work on other nbio implementations */
/* therefore, it's blocked so nobody accidentally relies on it */
puts("ERROR - attempted file shrink operation, not implemented");
abort();
}
if (ftruncate(handle->fd, len) != 0)
{
puts("ERROR - couldn't resize file (ftruncate)");
abort(); /* this one returns void and I can't find any other way
for it to report failure */
}
handle->ptr = realloc(handle->ptr, len);
handle->len = len;
}

View file

@ -121,10 +121,7 @@ static void nbio_stdio_begin_read(void *data)
return;
if (handle->op >= 0)
{
puts("ERROR - attempted file read operation while busy");
abort();
}
fseek(handle->f, 0, SEEK_SET);
@ -139,10 +136,7 @@ static void nbio_stdio_begin_write(void *data)
return;
if (handle->op >= 0)
{
puts("ERROR - attempted file write operation while busy");
abort();
}
fseek(handle->f, 0, SEEK_SET);
handle->op = NBIO_WRITE;
@ -200,15 +194,9 @@ static void nbio_stdio_resize(void *data, size_t len)
return;
if (handle->op >= 0)
{
puts("ERROR - attempted file resize operation while busy");
abort();
}
if (len < handle->len)
{
puts("ERROR - attempted file shrink operation, not implemented");
abort();
}
handle->len = len;
handle->progress = len;
@ -248,10 +236,7 @@ static void nbio_stdio_free(void *data)
if (!handle)
return;
if (handle->op >= 0)
{
puts("ERROR - attempted free() while busy");
abort();
}
fclose(handle->f);
free(handle->data);

View file

@ -116,16 +116,12 @@ static void nbio_mmap_unix_resize(void *data, size_t len)
/* this works perfectly fine if this check is removed, but it
* won't work on other nbio implementations */
/* therefore, it's blocked so nobody accidentally relies on it */
puts("ERROR - attempted file shrink operation, not implemented");
abort();
}
if (ftruncate(handle->fd, len) != 0)
{
puts("ERROR - couldn't resize file (ftruncate)");
abort(); /* this one returns void and I can't find any other
way for it to report failure */
}
munmap(handle->ptr, handle->len);
@ -133,10 +129,7 @@ static void nbio_mmap_unix_resize(void *data, size_t len)
handle->len = len;
if (handle->ptr == MAP_FAILED)
{
puts("ERROR - couldn't resize file (mmap)");
abort();
}
}
static void *nbio_mmap_unix_get_ptr(void *data, size_t* len)

View file

@ -144,7 +144,6 @@ static void nbio_mmap_win32_resize(void *data, size_t len)
* but it won't work on other nbio implementations */
/* therefore, it's blocked so nobody accidentally
* relies on it. */
puts("ERROR - attempted file shrink operation, not implemented");
abort();
}
@ -158,10 +157,7 @@ static void nbio_mmap_win32_resize(void *data, size_t len)
#endif
if (!SetEndOfFile(handle->file))
{
puts("ERROR - couldn't resize file (SetEndOfFile)");
abort(); /* this one returns void and I can't find any other way for it to report failure */
}
handle->len = len;
UnmapViewOfFile(handle->ptr);
@ -170,10 +166,7 @@ static void nbio_mmap_win32_resize(void *data, size_t len)
CloseHandle(mem);
if (!handle->ptr)
{
puts("ERROR - couldn't resize file (MapViewOfFile)");
abort();
}
}
static void *nbio_mmap_win32_get_ptr(void *data, size_t* len)