summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkiz <skiznet@aol.com>2024-10-02 16:41:28 -0400
committerSkiz <skiznet@aol.com>2024-10-02 16:41:28 -0400
commit84b8fd06d029882afaf66592ce102269560a7588 (patch)
tree3d744e1b32709217cf7929e32ecd6c762ae4ffc7
parenta3225e023718604751ee4a7b8c7a703ca048d262 (diff)
Removed retarded error handling (suckless)
-rw-r--r--spwd.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/spwd.c b/spwd.c
index a29a964..f886241 100644
--- a/spwd.c
+++ b/spwd.c
@@ -5,15 +5,10 @@ int main(void) {
char buffer[1024];
- //_getcwd(buffer, 1024);
-
- if (getcwd(buffer, sizeof(buffer)) != NULL) {
- printf("Current working dir: \n\n%s\n", buffer);
- } else {
- perror("getcwd() error");
- }
+ // Get the current working dir and saves it to "buffer".
+ getcwd(buffer, sizeof(buffer));
- printf("Furrent working dir: \n\n%s\n", buffer);
+ printf("Current working dir: \n\n%s\n", buffer);
return 0;