Add strerror to error test
This commit is contained in:
+3
-2
@@ -1,8 +1,9 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
chdir("nonexistent");
|
||||
printf("errno: %d\n", errno);
|
||||
chdir("nonexistent");
|
||||
printf("errno: %d = %s\n", errno, strerror(errno));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user