comparison cmd.c @ 4:b5c4267a7182

Fix check for successful deletion of a empty group A return value of NULL means that there is no empty group of that name. Improve the error message.
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Sun, 05 Feb 2017 13:30:31 +0100
parents a7e41e1a79c8
children 17fb30016e64
comparison
equal deleted inserted replaced
3:1cc98a5677d9 4:b5c4267a7182
438 if (argc != 2) { 438 if (argc != 2) {
439 return (CMD_USAGE); 439 return (CMD_USAGE);
440 } 440 }
441 441
442 if (pwfile_remove_group(ctx, argv[1]) != 0) { 442 if (pwfile_remove_group(ctx, argv[1]) != 0) {
443 fprintf(stderr, "group \"%s\" does not exist\n", argv[1]); 443 fprintf(stderr, "there is no empty group \"%s\"\n", argv[1]);
444 return (CMD_ERR); 444 return (CMD_ERR);
445 } 445 }
446 446
447 return (CMD_OK); 447 return (CMD_OK);
448 } 448 }