diff options
author | Skiz <skiznet@aol.com> | 2024-10-02 16:41:28 -0400 |
---|---|---|
committer | Skiz <skiznet@aol.com> | 2024-10-02 16:41:28 -0400 |
commit | 84b8fd06d029882afaf66592ce102269560a7588 (patch) | |
tree | 3d744e1b32709217cf7929e32ecd6c762ae4ffc7 | |
parent | a3225e023718604751ee4a7b8c7a703ca048d262 (diff) |
Removed retarded error handling (suckless)
-rw-r--r-- | spwd.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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; |