Commit Graph

3534 Commits

Author SHA1 Message Date
LibretroAdmin
fca6015011 (file_path) path_basedir - remove unnecessary strlcpy - add return value comment
to another function
2022-07-31 12:45:14 +02:00
LibretroAdmin
88bdaffa87 path_basedir_wrapper - get rid of unnecessary strlcpy 2022-07-31 12:42:50 +02:00
LibretroAdmin
36edb15c5b path_parent_dir - don't do implicit strlen inside 2022-07-31 12:31:55 +02:00
Cthulhu-throwaway
9b10579a54
(Network) Fix getaddrinfo_retro (#14261) 2022-07-31 11:22:28 +02:00
Cthulhu-throwaway
f96ef5407a
(Network) Refactor getaddrinfo_retro (#14258) 2022-07-30 22:43:32 +02:00
LibretroAdmin
2c3c9e1e71 Add note to string_list_join_concat 2022-07-27 15:51:16 +02:00
Cthulhu-throwaway
29f0ba2e71
(Network/Vita) Add net_ifinfo support (#14225) 2022-07-26 16:10:23 +01:00
Cthulhu-throwaway
97e3ef6ec7
(Network/Vita) Do not multiply negative timeout values (#14217) 2022-07-25 07:55:08 +02:00
Cthulhu-throwaway
07e03c86fa
(Network/Vita) Fix epoll's timeout parameter (#14216) 2022-07-25 07:07:14 +02:00
libretroadmin
a6a4b845a4 Some string simplifications - don't NULL terminate if we pass
string to strlcpy and/or a file_path function using strlcpy under
the hood - don't do strlcpy for trivial setting of 2/3 char strings
2022-07-25 04:39:08 +02:00
libretroadmin
8d12918243 (libretro-common) Small cleanups - don't NULL-terminate string
if we pass it off to fill_pathname_join (or another function that
uses strlcpy under the hood)
2022-07-22 19:33:30 +02:00
libretroadmin
05622ebe85 Some trivial strlen usage simplifications where possible, removing
the need for strlen
2022-07-20 17:23:28 +02:00
libretroadmin
ba35f0de93 (file_path.c) Do away with trivial strlen checks (checked if
return number was <= 2/>= 2, instead check first two characters
of the string directly instead for NULL
2022-07-19 23:23:37 +02:00
libretroadmin
7ff58265bf Simplify fopen_utf8 2022-07-19 21:31:26 +02:00
libretroadmin
f994c0b371 Get rid of superfluous wrapper function config_entry_exists 2022-07-19 21:00:40 +02:00
libretroadmin
4b5c7856e6 Remove some more explicit NULL-termination when we're calling a
string function that calls strlcpy under the hood
2022-07-19 20:43:12 +02:00
LibretroAdmin
29774f5b7a
Small opts (#14186)
* (joypad_connection) Small optimizations -
* Turn functions static where possible
* Hose strlen call out of loop

* (input_driver.c) General cleanups:
* Some small code/style nits

task_screenshot.c:
* Move widget callback function for screenshots to task_screenshot.c

(file_path.c):
* Turn get_pathname_num_slashes into static function
* path_linked_list_free - always returns true, so get rid of return value
* path_linked_list_new - fix function signature
* path_get_archive_delim - do not NULL-terminate string, already done by strlcpy later on

General:
* Slight optimizations - use int/size_t for loop counter variable instead of unsigned
* Take advantage of fact that strlcpy already NULL-terminates, so don't do this explicitly
outside if we're just going to end up calling strlcpy/fill_pathname_join on it anyway
2022-07-19 10:01:33 +02:00
Cthulhu-throwaway
83ed9a5980
(Network) Implement binary network streams (#14180) 2022-07-17 19:43:48 +02:00
libretroadmin
610292db61 Replace more trivial sscanf usage with strtol 2022-07-17 18:38:28 +02:00
libretroadmin
c89f6cf0a9 Replace more trivial usage of sscanf 2022-07-17 18:33:54 +02:00
libretroadmin
113b9e96d1 Miscellaneous cleanups to VFS layers:
* Indents
* Simplifications
2022-07-17 07:29:00 +02:00
libretroadmin
e4b33fd0e6 (formats/json/rjson.c) Get rid of some implicit strlens and pass
size parameter to the functions instead˜
2022-07-17 06:58:22 +02:00
libretroadmin
c570e657c1 (CDROM) Fix memory leak caught with asan - buf passed to filestream_read_file
was not being freed after we were done with it (we are done with it after iterating
over the string list)
2022-07-15 19:00:59 +02:00
libretroadmin
675ff6b9b6 net_http_send_str - reduce the amount of times strlen is called by
hardcoding the length when we feed the function a constant string
(with STRLEN_CONST)
2022-07-15 17:37:30 +02:00
Cthulhu-throwaway
98ca6232aa
(String) Some function fixes (#14171) 2022-07-12 22:32:58 +02:00
libretroadmin
69ddf03c91 Remove unused return variables 2022-07-12 18:00:33 +02:00
libretroadmin
83655420f6 file_list_prepend just a thin wrapper around file_list_insert - get
rid of it and just pass 0 as the last argument instead
2022-07-12 16:56:44 +02:00
libretroadmin
06e1b6a68f Revert "Move strftime_am_pm to libretro-common rtime.c, remove duplicate"
This reverts commit 99186b1056.
2022-07-12 03:31:42 +02:00
libretroadmin
99186b1056 Move strftime_am_pm to libretro-common rtime.c, remove duplicate
functions
2022-07-12 03:29:16 +02:00
Cthulhu-throwaway
f39df40728
(String) Do not assume char is unsigned (#14168) 2022-07-12 02:55:56 +02:00
libretroadmin
01d68fdb7e Remove unused fill_pathname_basedir_noext 2022-07-12 00:09:22 +02:00
libretroadmin
293722ac38 Get rid of fill_pathname_join_concat_ext 2022-07-11 22:01:20 +02:00
libretroadmin
b7926605f4 Remove fill_short_pathname_representation 2022-07-11 21:40:09 +02:00
libretroadmin
b1c9f93903 (file_path) remove deprecated functions 2022-07-11 21:29:01 +02:00
libretroadmin
adf9994828 Deprecate fill_pathname_base_noext 2022-07-11 20:13:44 +02:00
libretroadmin
7186d75c44 Designate fill_pathname_noext as deprecated function 2022-07-11 20:03:42 +02:00
libretroadmin
d706c9c5bf Start deprecating trivial functions in file_path.c 2022-07-11 19:56:46 +02:00
libretroadmin
7b83636b64 Remove variables that are never used because the return value
of the function is already used instead
2022-07-11 18:15:08 +02:00
libretroadmin
0d4ef1cef4 (file_path.c) Call trivial strlcpy/strlcat operations directly
instead of going through functions
2022-07-11 17:23:06 +02:00
libretroadmin
6438d575d4 (file_path.c) Simplifications 2022-07-11 17:14:09 +02:00
libretroadmin
f8d14a0af6 (net_http) Simplify net_http_update - get rid of the majority of
gotos
2022-07-11 16:50:32 +02:00
libretroadmin
61ba6d06cc (config_file.c) Cleanups - config_file_extract_value - only
one of three instances used the 'use_value' parameter, so take it
out of the function
2022-07-11 12:58:03 +02:00
libretroadmin
9e430cd8b9 (libretro-common) Cleanups:
* Work more with return values, prevent unnecessary local stack variables
when possible
* Reduce lines of code
* Move local stack variables to proper scope
2022-07-10 19:06:18 +02:00
libretroadmin
0e85113eb3 (libretro-common) Style nits/cleanups 2022-07-10 18:13:49 +02:00
libretroadmin
cd28d5ec8a (PSL1GHT/Switch) Fix warnings 2022-07-07 16:38:12 +02:00
libretroadmin
821bb86b37 Get rid of HAVE_THREADS macros 2022-07-06 15:01:53 +02:00
barbudreadmon
e9d67f2bbe
savestates: implement an api call for context awareness (#14101) 2022-06-30 10:45:59 +02:00
Cthulhu-throwaway
f2b3948b39
(UPnP) Attempt support for remaining platforms (#14107) 2022-06-26 21:38:52 +02:00
Cthulhu-throwaway
bc78e423ee
(WiiU) Buildfix 2 (#14104) 2022-06-25 19:47:23 +02:00
Cthulhu-throwaway
e961f27786
(WiiU) Buildfix (#14103) 2022-06-25 19:19:26 +02:00