Wrong use of fflush() standard library removed
authorManoj Gupta <manoj.g2@samsung.com>
Fri, 3 Feb 2017 07:06:27 +0000 (12:36 +0530)
committerPhil Coval <philippe.coval@osg.samsung.com>
Fri, 21 Jul 2017 09:31:21 +0000 (09:31 +0000)
Change-Id: Ic78a44f9dec3144de5a043accaa18ca2a0b38b02
Signed-off-by: Manoj Gupta <manoj.g2@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17033
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 1e713e21b54b029794a9dd4ac21df5fae8d75177)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21509
Reviewed-by: George Nash <george.nash@intel.com>
service/notification/examples/linux/notificationconsumer.c
service/notification/examples/linux/notificationprovider.c

index 1198fdc..b25e60a 100644 (file)
@@ -197,13 +197,11 @@ int main(void)
         {
             printf("Fail to input num\n");
         }
-        fflush(stdin);
 
         if(scanf("%c", &dummy) == EOF)
         {
             printf("Fail to input dummy\n");
         }
-        fflush(stdin);
 
         switch (num)
         {
index f777ede..7805607 100644 (file)
@@ -211,7 +211,6 @@ int main()
         {
             if(scanf("%c", &dummy) > 0)
             {
-                fflush(stdin);
                 printf("\n");
             }
         }