diff options
| author | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-25 20:10:31 +0100 |
|---|---|---|
| committer | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-25 20:10:31 +0100 |
| commit | a9a967642be399d21211519751e9a84b217fcd1d (patch) | |
| tree | a70ce6dc9847e0e64c92b5071c729c3f2ab04cc9 | |
| parent | eafff8845db6c81384beee5d72ac30a4c9cd1972 (diff) | |
fixed some bad code by calling it bad code in a coment
| -rwxr-xr-x | a.out | bin | 0 -> 51736 bytes | |||
| -rw-r--r-- | main.c | 18 |
2 files changed, 9 insertions, 9 deletions
| Binary files differ @@ -162,15 +162,15 @@ void remove_dir(const char *path) { } else { - - while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){ - if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){ - printf("%p",entry->d_name); - continue; - } - else if (remove(entry->d_name) != 0) { - printf("%p", entry->d_name); - perror("failed to delete the directory 02"); +// bad code, should be rewritten dont look at it!!! + while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){ + if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){ + printf("%p",entry->d_name); + continue; + } + else if (remove(entry->d_name) != 0) { + printf("%p", entry->d_name); + perror("failed to delete the directory 02"); } } } |
